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.

Full-text search filter on labels

chrszrkl
Node Clone

I have a composite full-text search index consisting of multiple labels. Now I want to search for a keywords and limit the results on a certain label. I know how to apply filtering with Cypher:


CALL db.index.fulltext.queryNodes('index', 'keyword*') YIELD node
WHERE (node:Product)

But this query will stream all results and apply filtering on the complete result set. Lucene allows to search for a specific property within its index:

CALL db.index.fulltext.queryNodes("index", 'property:"keyword*"') YIELD node

I was wondering if there is a possibility to filter on the Nodes' label inside of Lucene. Would this be possible to implement with a Custom Analyzer that stores the labels als custom property $labels inside the index? Where does the Custom Analyzer receive the Node or Relationship to index its properties?

0 REPLIES 0