I have a use case where I'm doing a full text search across several types of entities, and I'd like the results to promote one of those entities (something like ^2 from Apache Lucene).
Is such a thing possible ? I didn't find anything in the docs.
Thanks in advance,
So basically I'm creating a fulltext index, as described here: Fulltext search in Neo4j - Knowledge Base
Here's the created index:
CALL db.index.fulltext.createNodeIndex("titlesAndDescriptions",["Movie", "Book"],["title", "description", "review"])
I am then querying it like this:
CALL db.index.fulltext.queryNodes("titlesAndDescriptions", "title:matrix^3 description:matrix") YIELD node, score RETURN node.title, node.review, score
Here I'm boosting the score using ^ so that the score get higher if a match happens on the title field.
What I would like is to boost the score in the same way if the node is of label Movie, so that my search prioritises movies over books.
Hope it's clearer 🙂
I'm also trying to boost based on node label.
@prishabh35 I can't get this approach to work either. I'm also interested in any documentation regarding this.
@deepika could you elaborate on what you attempted using the WITH clause?
Layvier did you make any progress in the meantime?
Thank you all in advance!