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 for multiple unknown labels

chrszrkl
Node Clone

Hi guys!

I want to implement a omnibox search bar with one single text field and I fortunately found out about full-text search indices, so I saved a lot of work to implement it myself.

However, I have a few questions which I would like to clarify. My graph consists of multiple labels with different properties, for example Customer, Product, Order, etc. I'm planning to create one index for each label with all meaningful string properties.

First, when I enter something in the search bar I would like to search the given query across all labels and return the most relevant results (e.g. based on the given score). Would it make more sense to create one single search index across all labels and searchable properties OR search every single index on its own? The latter option could also be done dynamically by calling db.labels() and iterating over the result.

Secondly, the returned search results should emphasise the matching properties for the given query. That means if I search for a product number, it would make more sense to show the full product number as result instead of the product title. Is it possible somehow to get name of the properties which matched the given query during the full-text search?

Thank you for your help!

0 REPLIES 0