elasticsearch - Type conversion issue when using query dsl for nest -


var products =                 this.productclient.search<productsummarymodel>(s => s.from(startindex).size(pagesize).query(q =>                     {                         querydescriptor<productsummarymodel> query = null;                         if (productdetails.isvisible.hasvalue)                         {                             var productstatus = productdetails.isvisible.value                                                     ? constants.productstatus.visible                                                     : constants.productstatus.active;                             query &= query.term(p => p.status, productstatus.tostring());                         }                         else                         {                             query &= !q.term(p => p.status, constants.productstatus.deleted.tostring());                         }                          return query;                     })); 

i following errors.

cannot implicitly convert type 'nest.basequery' 'nest.querydescriptor'. explicit conversion exists (are missing cast?)

cannot implicitly convert type 'nest.basequery' 'nest.querydescriptor'. explicit conversion exists (are missing cast?)

cannot convert lambda expression type 'nest.searchdescriptor' because not delegate type

cannot convert lambda expression type 'nest.basequery' because not delegate type

what doing wrong here?

change line:

querydescriptor<productsummarymodel> query = null; 

to

basequery query = null; 

the docs blatantly wrong here update asap!


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -