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.

Question about passing parameter list into full text index

mmorley
Node Clone

Greetings! Am attempting to pass a list of terms into the full text index to return nodes that have matching term text in order to generate category nodes for a search UX. I have tried a few different patterns, but am unable to use an unwind statement approach to iterate over the list term collection, as the call db.index.fulltext.queryNodes needs a literal parameter as an input, otherwise it returns a cast error:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure db.index.fulltext.queryNodes: Caused by: java.lang.ClassCastException: org.neo4j.kernel.api.schema.MultiTokenSchemaDescriptor cannot be cast to org.neo4j.kernel.api.impl.fulltext.FulltextSchemaDescriptor

I have tried a number of ways of doing this from lists, casting to string, etc. but no avail. This seems like it should be simple to do, but I am stuck/missing something... Any help would be appreciated.. thanks!
M>

Query:

:param categories =>
['Measles','IPC','Hand Hygiene','Fluoride','Oral Products','Ebola','Antibiotic','OSAP','Norovirus']

unwind $categories as category
with category
CALL db.index.fulltext.queryNodes("cardText", category) YIELD node, score
with node, category,score where score > .3
with category,node where not node in (node)-[:HAS_FACET]-(:Category)
merge (f:Facet:Category {Name:category})
ON CREATE set f.Uuid=apoc.create.uuid()
merge (node)-[:HAS_FACET]->(f)

1 REPLY 1

Hi!
I had a similar issue on Neo4j v3.5.5, I had to drop index and rebuild it then full text queries works again.