fix failure in mlt with dates, this does mean that currently, mlt, when based on fetching the source and parsing it, does not do mlt on numbers
This commit is contained in:
parent
4492293b49
commit
41e100ad33
|
@ -151,6 +151,7 @@ public class TransportMoreLikeThisAction extends BaseAction<MoreLikeThisRequest,
|
|||
boolBuilder.mustNot(termQuery(uidTerm.field(), uidTerm.text()));
|
||||
} catch (Exception e) {
|
||||
listener.onFailure(e);
|
||||
return;
|
||||
}
|
||||
|
||||
String[] searchIndices = request.searchIndices();
|
||||
|
|
|
@ -141,7 +141,11 @@ public class JsonDateFieldMapper extends JsonNumberFieldMapper<Long> {
|
|||
}
|
||||
|
||||
@Override public String valueAsString(Fieldable field) {
|
||||
return dateTimeFormatter.printer().print(value(field));
|
||||
Long value = value(field);
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return dateTimeFormatter.printer().print(value);
|
||||
}
|
||||
|
||||
@Override public String indexedValue(String value) {
|
||||
|
|
Loading…
Reference in New Issue