Difference between "Missing Values" and "Unmapped Fields"


I need to sort my documents based on an optional field, "completionDate". Some documents will have this attribute while others won't. For documents which don't have "completionDate", I want to put them last in the sorting result.

For documents which don't have this field, does it qualify for Missing Values scenario? Or, will this field be treat as Unmapped Fields? Assume dynamic mapping is used.


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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.