Is there a way to query Elasticsearch with a NEST client using linq or lambda expressions.
I want to do something like this:
client.Search<MyClass>(s => s.MyProperty.Contains("value") &&
(s.MySecondProperty == 123 ||
s.ThirdProperty > 12)) ;
or
var query = from m in MyContext.MyClass
where ...
select m
I read a little about ElasticLinq , but it seems that it is no longer active. The latest nuget package was published in October 2015.
What I want to do is create a method that receives the Expression as parameter from the caller and searches for it. Caller must not be dependent on ES or NEST API
source
share