I am trying to execute the following query from the gas filter neo4j example in https://github.com/graphaware/graph-aided-search. How to use the Nest DSL in forming the query below or do I have to send raw Json using the low level client.
The high level NEST client won't be able to support that query, but you can use the low level client exposed on the high level client through the .LowLevel property for this
var query = @"{
""query"" : {
""match_all"" : {}
},
""gas-filter"" :{
""name"": ""SearchResultCypherFilter"",
""query"": ""MATCH (cust:Customer)-[:PURCHASED]->(:Order)-[o:ORDERS]->(p:Product) WHERE cust.contactName = 'Maria Anders' RETURN DISTINCT p.productID as id;"",
""exclude"": false
}
}";
var searchResponse = client.LowLevel.Search<SearchResponse<MyDocument>>(
"index",
"type",
query);
// will be SearchResponse<MyDocument>
var response = searchResponse.Body;
Nice thing about using the low level client on the high level client is that you can still return strongly typed responses.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.