c# - Nest exclude property on search -
i have search string properties big object:
q => q.querystring(qfqqs => qfqqs.query(mainsearch).defaultoperator(operator.and));
this object contains messagetext property , lot of other properties. have task change searching messagetext , searching other properties. search message text:
q => q.querystring(qs => qs.defaultfield(o => o.propertytextpart).query(mainsearch).defaultoperator(operator.and));
and search on properties need filter descriptor. if add other properties (it more 30), curve code (because if changes property list must change code to). how can exclude 1 field in search like:
q => q.querystring(qfqqs => qfqqs.query(mainsearch).defaultoperator(operator.and));
when map model, can exclude field
property:
[number(includeinall = false)]
then, when make defaultfield("_all").query(query)
search, field
ignored, when find element, query-ignored field recover in model.
nowadays, looking way make property dinamyc query.
i hope work you!
Comments
Post a Comment