elasticsearch/elasticsearch — Issue #1578: Allow 'ignore_unmapped' to process field mappings on each shard
Author: bryangreen
Created: 2011-12-30 17:11:34+00:00
State: open

The 'ignore_unmapped' feature needs to process all shard's field mapping rather than an going with an all/nothing mapping assumption.

In reference to: https://groups.google.com/group/elasticsearch/browse_thread/thread/4b677ad9e88b1967
Related to issue 1558: https://github.com/elasticsearch/elasticsearch/issues/1558

Initial setup:
Fails with ReduceSearchPhaseException[Failed to execute phase [fetch], [reduce] ]; nested:
url: kk,system,library/statustype/_search
query: {"from":0,"size":999,"sort":{"order_no": {"order":"asc","ignore_unmapped":true}}}
The "statustype" item type only exists in the system and library indexes but not in the kk index.
The query executes against the kk index and either the system or library index BUT when all three are together the search fails.
The title field is defined in the statustype item mapping and exists in all instances.
Removing the sort of the query dsl causes the search to success.
If I remove the "ignore_unmapped" part of the sort then I receive errors from the kk index but the search hits still come back for the other indexes...
Preferably, the "ignore_unmapped" feature should allow all data to be returned but provide a cascaded sort feature whereby ignoring certain sort keys but still continuing with the next sort field (if available.)