Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search results page: showing same result at end of every page #256

Open
gordom6 opened this issue Oct 14, 2020 · 4 comments
Open

Search results page: showing same result at end of every page #256

gordom6 opened this issue Oct 14, 2020 · 4 comments

Comments

@gordom6
Copy link
Contributor

gordom6 commented Oct 14, 2020

Search for sheep (no quotes). The node label sheep polypore is at the end of every results page.

@gordom6
Copy link
Contributor Author

gordom6 commented Oct 14, 2020

This happens irrespective of the search term (or the empty / match-all search), and only with the neo4j store. I've stepped through the search method and confirmed that the record is actually being returned from neoj. For reference, this is the query:

Query{text='CALL db.index.fulltext.queryNodes("node", $text) YIELD node, score
RETURN labels(node)[0] as type, node.label, node.id, node.inDegree, node.labels, node.outDegree, node.pos, node.sources, node.pageRank, node.wordNetSenseNumber
ORDER BY score desc
SKIP 20
LIMIT 10
', parameters={text: "id:*"}}

@gordom6
Copy link
Contributor Author

gordom6 commented Oct 14, 2020

It appears that neo4j's queryNodes procedure interacts oddly with ORDER BY. Taking out ORDER BY fixes the problem (because queryNodes returns nodes in order of descending score), but leaves us without sorting on other fields.

I've also seen documentation that says that queryNodes takes optional skip and limit parameters in a map, rather than having SKIP and LIMIT in the Cypher, but I can't get that to work.

We need to migrate away from neo4j, it's causing too many problems. I've filed another issue to replace the out-of-core store with Postgres.

@gordom6
Copy link
Contributor Author

gordom6 commented Oct 14, 2020

I'm leaving this bug in pending the switch to Postgres.

@gordom6
Copy link
Contributor Author

gordom6 commented Oct 14, 2020

@123joshuawu I will prioritize #257 so that demo-type searches for single words don't reach the search results page at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant