Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-11-2020 11:05 PM
Hi, so we are developing a new web application and utilising Neo4j to build reports on data.
Here is a use case scenario:
I can think of a couple of different ways of achieving point 4, but I wondered if the more experienced here might be able to offer better solutions or whether there is an efficient way of doing it?
One crude technique:
(u:User)-[:MADE_SEARCH]->(s:Search)
(s:Search)-[:RESULT]->(c:Campaign)
However, the database is reasonably big (85m nodes, 600m+ relationships), and there will be many different searches run per day, with each search having results between a couple of hundred, up to potentially a few million.
This would end up with a lot of relationships being created from the search node to results. If we then wanted to actually perform a search against those results, is having that many relationships efficient?
Am I just worrying over nothing and this is an ok solution?
I am worried that say after 1 year of running this web app, there will be thousands of searches saved, with millions of those search-campaign relationships.
Thanks
12-12-2020 12:10 PM
Are there any properties associated with the Nodes or Relationships that can be indexed and limit the scope of the query? E.g. Date/Time, Info about the User, the Campaign, etc.
If so, it might not be so bad.
12-12-2020 10:31 PM
Yes, hadn't considered that, but there would be some attributes that would be indexed.
First the User node will have a user ID.
The Search node will have a unique search ID as well. So, in reality when searching against those search results, we would match by search ID, to find the records related to it.
I guess my concern is having hundreds of thousands or potentially several million nodes all point to one single node. There would then be multiple instances of this within the graph.
Most of these will also become redundant as the user becomes less interested in using those search results. In this case we could perhaps notify the user that a stored search would be deleted after 3 months of inactivity and offer them the choice to keep it.
All the sessions of the conference are now available online