cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

clem
Graph Steward

Full text indexing (Indexes for full-text search - Neo4j Cypher Manual ) works well for me except the default analyzer strips hyphens from indexing.

Consider that the search for "Emergency" should not return "Non-Emergency". Product codes often have dashes in them too.

This is actually a lucene question/issue. I did find this:

So this works:

CALL db.index.fulltext.createNodeIndex("IndexName",["Label"],["property"], 
{ analyzer: "classic"}) // does not throw out hyphens, e.g. Non-Emergency is one word

This doesn't seem to be documented in the Neo4J documentation.

1 Comment
clem
Graph Steward

Oops... I didn't actually try this out until just now. The 'classic' Analyzer option doesn't do what the stackoverflow page claims.

'whitespace' sort of works except it won't split on other punctation marks (e.g. comma, period, etc."

Rat