/** * Is all included or not. Will always disable it if {@link org.elasticsearch.index.mapper.AllFieldMapper#enabled()} * is {@code false}. If its enabled, then will return {@code true} only if the specific flag is {@code null} or * its actual value (so, if not set, defaults to "true") and the field is indexed. */ private boolean includeInAll(Boolean includeInAll, boolean indexed) { if (isWithinCopyTo()) { return false; } if (isWithinMultiFields()) { return false; } if (!docMapper().allFieldMapper().enabled()) { return false; } if (includeInAll == null) { includeInAll = getIncludeInAllDefault(); } // not explicitly set if (includeInAll == null) { return indexed; } return includeInAll; }
allEnabled |= mapper.allFieldMapper().enabled();
public void reset(ImmutableMappingInfo.ImmutableIndexInfo ii, Uid uid) { this.indexInfo = ii; this.docMapper = ii.indexService.mapperService().documentMapper(uid.type()); assert this.docMapper != null; this.document = ii.indexStaticOnly() ? new StaticDocument("",null, uid) : new Document(); this.documents.clear(); this.documents.add(this.document); this.id = uid.id(); this.uid = new Field(UidFieldMapper.NAME, uid.toBytesRef(), UidFieldMapper.Defaults.FIELD_TYPE);; //this.path.reset(); this.allEntries = (this.docMapper.allFieldMapper().enabled()) ? new AllEntries() : null; this.docBoost = 1.0f; this.dynamicMappers = null; this.parent = null; this.externalValue = null; }
/** * Is all included or not. Will always disable it if {@link org.elasticsearch.index.mapper.internal.AllFieldMapper#enabled()} * is <tt>false</tt>. If its enabled, then will return <tt>true</tt> only if the specific flag is <tt>null</tt> or * its actual value (so, if not set, defaults to "true") and the field is indexed. */ private boolean includeInAll(Boolean specificIncludeInAll, boolean indexed) { if (isWithinCopyTo()) { return false; } if (isWithinMultiFields()) { return false; } if (!docMapper().allFieldMapper().enabled()) { return false; } // not explicitly set if (specificIncludeInAll == null) { return indexed; } return specificIncludeInAll; }
/** * Is all included or not. Will always disable it if {@link org.elasticsearch.index.mapper.AllFieldMapper#enabled()} * is {@code false}. If its enabled, then will return {@code true} only if the specific flag is {@code null} or * its actual value (so, if not set, defaults to "true") and the field is indexed. */ private boolean includeInAll(Boolean includeInAll, boolean indexed) { if (isWithinCopyTo()) { return false; } if (isWithinMultiFields()) { return false; } if (!docMapper().allFieldMapper().enabled()) { return false; } if (includeInAll == null) { includeInAll = getIncludeInAllDefault(); } // not explicitly set if (includeInAll == null) { return indexed; } return includeInAll; }
/** * Is all included or not. Will always disable it if {@link org.elasticsearch.index.mapper.AllFieldMapper#enabled()} * is <tt>false</tt>. If its enabled, then will return <tt>true</tt> only if the specific flag is <tt>null</tt> or * its actual value (so, if not set, defaults to "true") and the field is indexed. */ private boolean includeInAll(Boolean includeInAll, boolean indexed) { if (isWithinCopyTo()) { return false; } if (isWithinMultiFields()) { return false; } if (!docMapper().allFieldMapper().enabled()) { return false; } if (includeInAll == null) { includeInAll = getIncludeInAllDefault(); } // not explicitly set if (includeInAll == null) { return indexed; } return includeInAll; }
/** * The reason why a mapping is being merged. */ public enum MergeReason { /** * Create or update a mapping. */ MAPPING_UPDATE, /** * Recovery of an existing mapping, for instance because of a restart, * if a shard was moved to a different node or for administrative * purposes. */ MAPPING_RECOVERY; }
allEnabled |= mapper.allFieldMapper().enabled();
allEnabled |= mapper.allFieldMapper().enabled();
public static class InternalParseContext extends ParseContext { private final DocumentMapper docMapper; private final DocumentMapperParser docMapperParser; private final ContentPath path; private final XContentParser parser; private Document document; private final List<Document> documents; @Nullable private final Settings indexSettings; private final SourceToParse sourceToParse; private Field version; private SeqNoFieldMapper.SequenceIDFields seqID; private final AllEntries allEntries; private final List<Mapper> dynamicMappers; private boolean docsReversed = false; private final Set<String> ignoredFields = new HashSet<>();