better logging on missing format, and allow to configure format on a type on the index level
This commit is contained in:
parent
09cc70b8c9
commit
27bfb341ff
|
@ -121,6 +121,16 @@ public class IndexFieldDataService extends AbstractIndexComponent {
|
|||
IndexFieldData.Builder builder = null;
|
||||
if (type.getFormat() != null) {
|
||||
builder = buildersByTypeAndFormat.get(Tuple.tuple(type.getType(), type.getFormat()));
|
||||
if (builder == null) {
|
||||
logger.warn("failed to find format [" + type.getFormat() + "] for field [" + fieldNames.fullName() + "], will use default");
|
||||
}
|
||||
}
|
||||
String format = indexSettings.get("index.fielddata.type." + type.getType() + ".format", null);
|
||||
if (format != null) {
|
||||
builder = buildersByTypeAndFormat.get(Tuple.tuple(type.getType(), type.getFormat()));
|
||||
if (builder == null) {
|
||||
logger.warn("failed to find index level type format [" + format + "] for field [" + fieldNames.fullName() + "], will use default");
|
||||
}
|
||||
}
|
||||
if (builder == null) {
|
||||
builder = buildersByType.get(type.getType());
|
||||
|
|
Loading…
Reference in New Issue