Skip to content

Commit 77c30b1

Browse files
committed
check nullValue instead of address. Since nullValue can only make address null
1 parent 86a1aa0 commit 77c30b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/elasticsearch/index/mapper/IpFieldMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,11 @@ protected void parseCreateField(DocumentParserContext context) throws IOExceptio
582582
throw e;
583583
}
584584
}
585-
if (address != null) {
585+
if (nullValue != null) {
586586
indexValue(context, address);
587587
}
588588
if (offsetsFieldName != null && context.isImmediateParentAnArray() && context.canAddIgnoredField()) {
589-
if (address != null) {
589+
if (nullValue != null) {
590590
BytesRef sortableValue = new BytesRef(InetAddressPoint.encode(address));
591591
context.getOffSetContext().recordOffset(offsetsFieldName, sortableValue);
592592
} else {

0 commit comments

Comments
 (0)