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.

Any chance to run fulltext query in http api?

Gosforth
Graph Buddy

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

3 REPLIES 3

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.

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