c# - NEST Elasticsearch query value between 2 field names -
i want convert following sql query elasticsearch nest query:
select * table1 20 between minage , maxage
so far nest query looks ("20" value client):
var result5 = client.search<person>(b => b .filter(ff => ff .range(n => n .onfield(f => f.minage) .greater(20) ) ) .filter(ff => ff .range(n => n .onfield(f => f.maxage) .lower(???) // how specify max value fieldname? ) );
.filter(ff => ff .range(n => n .onfield(f => f.minage) .greater(x) ) && ff .range(n => n .onfield(f => f.maxage) .lower(x) ) )
in way have x -> between minage , maxage. x must greater minage , lower maxage in same time. hope helps!
Comments
Post a Comment