elasticsearch sort (“Missing Values” 和 “Unmapped Fields” 的區別)

missing value: 

   index中定義了對應字段, 但是對於一些特別的文檔不存在該字段的內容, missing value 決定對於這些文檔採取的策略

unmapped field:

  當你從多個index中查找並且排序時, 對於一個index存在filed1, 但是另一個index沒有定義filed1, 通過unmapped field解決index的mappings中沒有定義的情況.

 

總結: missing value 解決index的mapping中定義了但是doc中缺失該字段, unmapped filed 解決index的mapping上就沒有定義對應的sort字段的情況;

 

 

主要翻譯網上的內容:

It really depends on how many indices you are using. Missing values define how to sort documents from the index where this field is defined but some documents don't have any value specified for this field. The unmapped fields are needed when you search multiple indices and you are sorting on a field that is defined in one index, but not defined in another.

摘自:https://discuss.elastic.co/t/difference-between-missing-values-and-unmapped-fields/132382

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章