mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
better failure message for sorting when mapping is not found
This commit is contained in:
parent
b113eb18fe
commit
4ffbdbeaea
@ -140,7 +140,7 @@ public class SortParseElement implements SearchParseElement {
|
||||
} else {
|
||||
FieldMapper fieldMapper = context.smartNameFieldMapper(fieldName);
|
||||
if (fieldMapper == null) {
|
||||
throw new SearchParseException(context, "No mapping found for [" + fieldName + "]");
|
||||
throw new SearchParseException(context, "No mapping found for [" + fieldName + "] in order to sort on");
|
||||
}
|
||||
sortFields.add(new SortField(fieldMapper.names().indexName(), fieldMapper.fieldDataType().newFieldComparatorSource(context.fieldDataCache(), missing), reverse));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user