i trying search in elasticsearch using nest. want use object initializer syntax because need build parts of search dynamically. have figured out how build of request, not clear how initialize raw query. ois doesn't seem have queryraw parameter request.
code have now:
var searchresults = client.search<dynamic>(s => s .index("myindex"), .type("mytype), .aggregations(a => .datehistogram("my_date_histogram", h => h .field("datefield") .interval("day") ) ) .queryraw(querytext) )
code trying create:
var request = new searchrequest<dynamic> { index = "myindex", type = "mytype", queryraw = <doesn't exist> };
you can
var searchresponse = client.search<dynamic>(new searchrequest { query = new rawquery(yourquery) });
tested nest 2.0.0.alpha2 , es 2.1.0
Comments
Post a Comment