elasticsearch - Generate QueryString with named fields using nest elastic search client -



elasticsearch - Generate QueryString with named fields using nest elastic search client -

im using nest elastic clien, run basic search terms this:

.query(q => q.querystring(qs=>qs.query("user search term")));

and i'm combining basic search terms facets filters this:

.query( q => q.querystring(qs => qs.query("user search term")) && q.terms(t => t.brand, new string[] {"brand1", "brand2"}) && q.terms(t => t.colour, new string[] {"blue", "black"}) && q.range(r => r.from(50).to(100).onfield(f => f.price)) );

however i'm struggling run custom query string searches apply specific fields. search querystring passed app , hence wont know specific fields im searching cannot utilize .onfield() method on client

for illustration want able pass in querystring searches brand, gender , colour @ same time. looking @ elastic search query dsl think should able pass in querystring names fields so:

.query(q => q.querystring(qs => qs.query("brand:brand1 , gender:male , colour(blue)")));

but doesnt work , returns no results. how can generate querystring search on specific fields nest client?

also there way of viewing generated query nest searchdescriptor?

elasticsearch nest

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -