in my graph we have users that have 2 relation called "favorite" and "seen" with products and product have relation called has with some specification as colors(red blue...) , types(jeans....) and sizes (30...)
so i make some query that when i wanna create favorite or seen relation , it makes a relation with that specific user and the specification of that product calling "weight" and set property for that called "score" and i wanna increase this score every time user that set product to favorite or just seeing that product for example when a user see the product score change to +10 and for favorite change to +20 and then we recommend products with specifications that have most score
my query is
match (user:Users{m_id:""}),(m:Products{m_id:""})-[:HAS]->(a:Specifications)
MERGE (user) -[:FAVORITE]-> (m)
merge (user)-[:WEIGHT{score:0}]->(a)
and one more problem with this query is i dont wanna make new relation if i already have it i just wanna increase the scoreenter image description here