c# - NEST Elastic Search: Difference between FilterInputs term and terms? -
filterinputs mustfilters; mustfilters &= ms.term("cityid", filterinputs.cities); mustfilters &= ms.terms("cityids", filterinputs.cities);
what difference between above 2 lines?
as far have tested, second allow multiple cities in document kye cityids. if matches filterinputs.cities=> record returned.
while first allow once city.if matches=>record return else not.
please confirm.
term
allows match 1 term. according documentation:
the term query finds documents contain exact term specified in inverted index.
see here
while terms
allows specify multiple terms , match of them.it works in
in sql
. according documentation:
terms query filters documents have fields match of provided terms (not analyzed).
see here
Comments
Post a Comment