Skip to content

Commit 52e274c

Browse files
committed
Add a couple of comments
1 parent b44eac3 commit 52e274c

File tree

1 file changed

+3
-1
lines changed
  • server/src/main/java/org/elasticsearch/index/mapper

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ default boolean supportsVersion(IndexVersion indexCreatedVersion) {
136136
* This class models the ignore_above parameter in indices.
137137
*/
138138
public static final class IgnoreAbove {
139-
139+
// We use Integer.MAX_VALUE to represent a no-op, ignoring no values.
140140
public static final int IGNORE_ABOVE_DEFAULT_VALUE = Integer.MAX_VALUE;
141141
public static final int IGNORE_ABOVE_DEFAULT_VALUE_FOR_LOGSDB_INDICES = 8191;
142142

@@ -176,6 +176,8 @@ public boolean isSet() {
176176
* Returns whether values are potentially ignored, either by an explicitly configured ignore_above or by the default value.
177177
*/
178178
public boolean valuesPotentiallyIgnored() {
179+
// We use Integer.MAX_VALUE to represent ignoring no values. If the value is anything else, then either we have an
180+
// explicitly configured ignore_above, or we have a non no-op default.
179181
return get() != Integer.MAX_VALUE;
180182
}
181183

0 commit comments

Comments
 (0)