Browse Source

Update javadoc on _id field mapper (#84886)

It was wildly out of date.
Nik Everett 3 years ago
parent
commit
5c857d1be0

+ 3 - 3
server/src/main/java/org/elasticsearch/index/mapper/ProvidedIdFieldMapper.java

@@ -50,9 +50,9 @@ import java.util.function.BooleanSupplier;
 import java.util.function.Supplier;
 
 /**
- * A mapper for the _id field. It does nothing since _id is neither indexed nor
- * stored, but we need to keep it so that its FieldType can be used to generate
- * queries.
+ * A mapper for the {@code _id} field that reads the from the
+ * {@link SourceToParse#id()}. It also supports field data
+ * if the cluster is configured to allow it.
  */
 public class ProvidedIdFieldMapper extends IdFieldMapper {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(ProvidedIdFieldMapper.class);

+ 2 - 3
server/src/main/java/org/elasticsearch/index/mapper/TsidExtractingIdFieldMapper.java

@@ -32,9 +32,8 @@ import java.util.Locale;
 import java.util.function.Supplier;
 
 /**
- * A mapper for the _id field. It does nothing since _id is neither indexed nor
- * stored, but we need to keep it so that its FieldType can be used to generate
- * queries.
+ * A mapper for the {@code _id} field that builds the {@code _id} from the
+ * {@code _tsid} and {@code @timestamp}.
  */
 public class TsidExtractingIdFieldMapper extends IdFieldMapper {
     private static final FieldType FIELD_TYPE = new FieldType();