neo4j-devtools / neo4j-bloom

A public repository for informal docs, problem reporting and content sharing related to Neo4j Bloom.
Apache License 2.0
18 stars 0 forks source link

Issues with search bar suggestions after turning on "case insensitive search and suggestions" and creating full-text indexes #35

Open kixxalot opened 3 years ago

kixxalot commented 3 years ago

After turning on "case insensitive search and suggestions" and creating full-text indexes, there are issues with the suggestions in the search bar. In many instances where there should be clear matches, suggestions do not appear.

Full text indexes were created like this: CALL db.index.fulltext.createNodeIndex("nameIndex", ["Name"], ["name"]);

If I then search this index using Cypher for a specific name, it returns correctly: e.g. CALL db.index.fulltext.queryNodes('nameIndex', 'first5lettersofname')

But typing these same 5 letters in the Bloom search bar does not result in this name being shown as a suggestion.

Bloom 1.6, Neo4j 4.1.3

tbwiss commented 3 years ago

Hej @kixxalot! Would you be able to provide us with some more information and details regarding this? For instance did you encounter this with a publicly available database (like these? Which search term did you use?

Be aware that Bloom does not show any suggestions for the full text search. When you do a full text search there is only a magnifying glass shown next to the provided search term as a "suggestion", not the usual "pills" with categories.

kixxalot commented 3 years ago

Sorry for the extremely late reply, but here is an example to reproduce:

Make sure that there is fulltext index for "Contact", e.g.: CALL db.index.fulltext.createNodeIndex("ContactIndex", ["Contact"], ["name"])

Create a node "Contact" with property "name": "aal lantaarnpaal".

Now type "aal" in the Bloom search bar (without pressing enter).
Result: "aal lantaarnpaal" is shown as a suggestion with "aal" underlined twice. So far so good.

But now type "lantaarn". Result: our contact is NOT shown as suggestion, while obviously we do expect this.

Is there some type of stemming going on behind the scenes?

tbwiss commented 3 years ago

@kixxalot Using a Neo4j 4.3 enterprise dbms on Neo4j Desktop, given that the fulltext index for 'Contact' exists. So: CALL db.index.fulltext.createNodeIndex("ContactIndex", ["Contact"], ["name"])

If you then query CALL db.index.fulltext.queryNodes('ContactIndex', 'lantaarn') The query returns empty therefore Bloom does not show a suggestion. The query returns the "aal lantaarnpaal" node when searching for "aal" however as you already stated.

As this is not really my area of expertise I can't really say what the reason behind this is. I would suggest you ask this question in the Neo4j community as there are likely members of the community who can help you with that or point you in the right direction.