Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-14-2020 02:07 AM
Hi,
I'm absolute beginner in Neo4j (noob). I started to search product that would allow me to build product recommendation service and Internet brought me here. I installed Neo4j base and... I do not know how to go further.
Will somebody be so kind to help me?
I have product purchase history :
customer_no, product_no, product_description, quatity, value
Then I need query that will show me (parameter will be client_no and/or product_no/product_numbers):
Regards,
Gosf
02-18-2020 12:51 AM
Hi @Gosforth, Welcome to the community
If you haven't done so yet then is suggest going trough https://neo4j.com/developer/get-started/ pages
Tons of useful information. The best way to start is by taking an introduction course at GrapAcademy.
If you are already done that - then when you start your project.
Start with creating a model. There is a great site, that allows you easily draw your graph model - also a picture of this model can be helpful when u ask questions on community site - visualizing your data/model allows people to get to the same page with you in the seconds.
http://www.apcjones.com/arrows/#
Like so
<ul class="graph-diagram-markup" data-internal-scale="1" data-external-scale="1">
<li class="node" data-node-id="0" data-x="144.9724578857422" data-y="-915.5915303230286">
<span class="caption">Product</span><dl class="properties"><dt>product_no</dt><dd>'10010'</dd><dt>description</dt><dd>'some description'</dd><dt>quantity</dt><dd>'2'</dd><dt>value</dt><dd>'101'</dd></dl></li>
<li class="node" data-node-id="4" data-x="-558.7125917673111" data-y="-915.5915303230286">
<span class="caption">Customer</span><dl class="properties"><dt>customer_no</dt><dd>'1231'</dd></dl></li>
<li class="relationship" data-from="4" data-to="0">
<span class="type">has_bought</span>
</li>
</ul>
What are the top 5 products (by quantity or value) that other clients bought and this client did NOT buy?
//Maybe this query would do:
//Find top 5 products bought by other Customers & not this_client
WITH '1010' as this_client
MATCH (c:Customer)-[:has_bought]->(p:Product)
WHERE NOT c.customer_no = this_client
RETURN p.product_no, sum(p.value) as valueSum
ORDER by valueSum DESC
LIMIT 5
It will be easier to test and create your queries once you create some test data (that you can also share here) - so people could quickly input it and play with queries.
Also on the Recomendation engine - check out this thread, play with that movie graph sample - that can give you ideas for your own project.
02-19-2020 12:57 AM
Thank you very much for your help! I will play with your recommendation.
Have a great day!
All the sessions of the conference are now available online