Any chance to run fulltext query in http api?

Hi,

I'd like to find similar phrases using query:

 `CALL db.index.fulltext.queryNodes("ProductNameIndex", "product_name: yppytyynytyydytys") YIELD node, score`
 `RETURN node.product_name as prod_desc, score`

Is there any chance to use HTTP API to execute it?

Regards

You can use for any Cypher query the HTTP endpoint as well - regardless if it's "normal" cypher or procedure calls.

Note: the http endpoint is not cluster aware and does not have the routing capabilties of the bolt drivers for causal cluster.

1 Like

Thanks. I've tried that and for some reason this JSON query does not work:

{"statements" : [ {"statement" : "CALL db.index.fulltext.queryNodes(\"ProductNameIndex\", \"product_name: some product\") YIELD node, score RETURN node.product_name as prod_desc, node.product_id AS product_id, score, LIMIT 10" } ]}

Result:
{"results":[],"errors":[{"code":"Neo.ClientError.Request.InvalidFormat","message":"Could not parse the incoming JSON"}]}

What's wrong with that?
Regards

Oh, I got it. My fault; LIMIT 10 should be not preceded by ','
Thanks for help