public InternalParseContext(IndexSettings indexSettings, DocumentMapperParser docMapperParser, DocumentMapper docMapper, SourceToParse source, XContentParser parser) { this.indexSettings = indexSettings; this.docMapper = docMapper; this.docMapperParser = docMapperParser; this.path = new ContentPath(0); this.parser = parser; this.document = new Document(); this.documents = new ArrayList<>(); this.documents.add(document); this.version = null; this.sourceToParse = source; this.allEntries = new AllEntries(); this.dynamicMappers = new ArrayList<>(); }
public InternalParseContext(IndexSettings indexSettings, DocumentMapperParser docMapperParser, DocumentMapper docMapper, SourceToParse source, XContentParser parser) { this.indexSettings = indexSettings; this.docMapper = docMapper; this.docMapperParser = docMapperParser; this.path = new ContentPath(0); this.parser = parser; this.document = new Document(); this.documents = new ArrayList<>(); this.documents.add(document); this.version = null; this.sourceToParse = source; this.allEntries = new AllEntries(); this.dynamicMappers = new ArrayList<>(); }
public InternalParseContext(@Nullable Settings indexSettings, DocumentMapperParser docMapperParser, DocumentMapper docMapper, SourceToParse source, XContentParser parser) { this.indexSettings = indexSettings; this.docMapper = docMapper; this.docMapperParser = docMapperParser; this.path = new ContentPath(0); this.parser = parser; this.document = new Document(); this.documents = new ArrayList<>(); this.documents.add(document); this.version = null; this.sourceToParse = source; this.allEntries = new AllEntries(); this.dynamicMappers = new ArrayList<>(); }
parser = transform(mapping, parser); context.reset(parser, new ParseContext.Document(), source);
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; }
public InternalParseContext(@Nullable Settings indexSettings, DocumentMapperParser docMapperParser, DocumentMapper docMapper, SourceToParse source, XContentParser parser) { this.indexSettings = indexSettings; this.docMapper = docMapper; this.docMapperParser = docMapperParser; this.path = new ContentPath(0); this.parser = parser; this.document = new Document(); this.documents = new ArrayList<>(); this.documents.add(document); this.version = null; this.sourceToParse = source; this.allEntries = new AllEntries(); this.dynamicMappers = new ArrayList<>(); }
protected static ParseContext.Document testDocument() { return new ParseContext.Document(); }
/** * Return a new context that will be used within a nested document. */ public final ParseContext createNestedContext(String fullPath) { final Document doc = new Document(fullPath, doc()); addDoc(doc); return switchDoc(doc); }
/** * Return a new context that will be used within a nested document. */ public final ParseContext createNestedContext(String fullPath) { final Document doc = new Document(fullPath, doc()); addDoc(doc); return switchDoc(doc); }
public Context(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.add(this.document); }
/** * Return a new context that will be used within a nested document. */ public final ParseContext createNestedContext(String fullPath) { final Document doc = new Document(fullPath, doc()); addDoc(doc); return switchDoc(doc); }
public void beginNestedDocument(String fullPath, Uid uid) { final Document doc = (baseCfs.metadata.hasStaticColumns()) ? new StaticDocument(fullPath, doc(), uid) : new Document(fullPath, doc()); addDoc(doc); this.document = doc; }
/** * Return a new context that will be used within a nested document. */ public final ParseContext createNestedContext(String fullPath) { final Document doc = new Document(fullPath, doc()); addDoc(doc); return switchDoc(doc); }
/** * Return a new context that will be used within a nested document. */ public final ParseContext createNestedContext(String fullPath) { final Document doc = new Document(fullPath, doc()); addDoc(doc); return switchDoc(doc); }