I have a database with articles and tags with relations
(tag)<-[:CONTAINS]-(article). I would like to find the most popular tags connected to a certain topic. For example, what are the 10 most popular tags that are used such that at least one connected article contains the text "python"? I have tried the following query, but I seem to be getting multiple results:
Where a.text Contains "python"
With t, Size((t)<-[:CONTAINS]-()) as s
Return t.tag, s
Order by s DESC Limit 10
What's the right way to do this?