Reputation: 469
Referring to the documentation https://neo4j.com/docs/cypher-manual/3.5/schema/index/#schema-index-fulltext-search-query
Consider below full text search query
CALL db.index.fulltext.queryNodes("titlesAndDescriptions", 'Full Metal Jacket') YIELD node, score RETURN node
How do I get which property matches the search keyword keyword. (i.e in above example 'Full Metal Jacket' found in title or description ?)
Upvotes: 1
Views: 425
Reputation: 5385
you could do something like:
WITH 'Full Metal Jacket' AS searchString
CALL db.index.fulltext.queryNodes("titlesAndDescriptions", searchString) YIELD node, score
WITH node,
node.title CONTAINS searchString AS inTitle,
node.description CONTAINS searchString AS inDescription
RETURN node,inTitle,inDescription
Upvotes: 0