For those looking for an example of both ignore_unmapped and unmapped_type see my answer here .
Note that ignore_unmapped is now deprecated in favor of unmapped_type. It was made as part of # 7039
From the documentation: Prior to 1.4.0, there was a logical parameter ignore_unmapped, which had insufficient information to determine the sort values ββfor emission, and did not work for searching across multiple indexes. It is still supported, but users are advised to switch to the new unmapped_type file.
By default, the search query will not be executed if there is no mapping to the field. The unmapped_type option allows you to ignore fields that do not have a mapping, but are not sorted by them. The value of this parameter is used to determine the sort values ββto emit. Here is an example of how it can be used:
{ "sort" : [ { "price" : {"unmapped_type" : "long"} }, ], "query" : { "term" : { "user" : "kimchy" } } }
If any of the requested indexes does not have a comparison for the price, then Elasticsearch will process it as if it were a display of type long, while all documents in this index did not matter for this field.
Navneet Kumar Jun 15 '15 at 21:16 2015-06-15 21:16
source share