You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if we want to limit the range from both sides currently FluentNest won't be able to smartly used the RangeQuery and will instead create a Bool Query with 2 inside queries. For instance the following:
sc.FilterOn(x=>x.Timestamp < DateTime.Now && x=> x.Timestamp > new DateTime(2015,10,10))
What we should do instead is to apply LessThen and GreaterThan on the range itself.
This will be heuristics optimization inside the recursive parse of the expression tree. It is really not great way to do that. Maybe for FluentNest 2.* we should get a better abstraction of the AST of the expression which could than be optimized, but for now I think I will just implement a quick optim.
The text was updated successfully, but these errors were encountered:
Currantly any comparison expression is transformed into a Range Query:
will be transformed into:
But if we want to limit the range from both sides currently FluentNest won't be able to smartly used the RangeQuery and will instead create a Bool Query with 2 inside queries. For instance the following:
sc.FilterOn(x=>
x.Timestamp < DateTime.Now && x=>
x.Timestamp > new DateTime(2015,10,10))will create something along these lines:
What we should do instead is to apply LessThen and GreaterThan on the range itself.
This will be heuristics optimization inside the recursive parse of the expression tree. It is really not great way to do that. Maybe for FluentNest 2.* we should get a better abstraction of the AST of the expression which could than be optimized, but for now I think I will just implement a quick optim.
The text was updated successfully, but these errors were encountered: