2017-10-09 72 views

回答

2

該查詢類型爲removed

因此,正如官方文檔所述,在bool查詢中使用filter option

client 
    .Search<YourDocumentType>(s => s 
     .Query(q => q 
      .Bool(descriptor => descriptor 
       .Filter(f => f.Term("fieldId", "term"))))); 

您還可以使用+運算符重寫此查詢。請看看wonderful NEST documentation

希望有所幫助。

相關問題