elasticsearch - Multi Terms search NEST C# -
i want search matching multiple values ( array of values ) :
var result1 = _client.search<type1>(s => s .fields(f => f.trip_id) .query(q => q .terms(t => t.arg1, value1)).take(_alldata)) .documents.select(d => d.arg2).toarray(); var result2 = _client.search<type2>(s => s .query(q => q .terms(t => t.arg3, result1)) .take(_alldata) ).documents.select(s => s.ar3).tolist();
how can ? thinking facets don't see how can it. way works foreach
iterator not effective...
thanks help.
you can express multiple queries so:
.query(q=>q.terms(t=>t.arg3, result1) && q.terms(t=>t.arg1, value1))
be sure read documentation on writing queries discover stuff nest has offer.
Comments
Post a Comment