Class ParseContext

    • Constructor Detail

      • ParseContext

        public ParseContext()
    • Method Detail

      • nonRootDocuments

        public abstract java.lang.Iterable<ParseContext.Document> nonRootDocuments()
        Returns an Iterable over all non-root documents. If there are no non-root documents the iterable will return an empty iterator.
      • addIgnoredField

        public abstract void addIgnoredField​(java.lang.String field)
        Add the given field to the set of ignored fields.
      • getIgnoredFields

        public abstract java.util.Collection<java.lang.String> getIgnoredFields()
        Return the collection of fields that have been ignored so far.
      • getIncludeInAllDefault

        public java.lang.Boolean getIncludeInAllDefault()
        Whether field values should be added to the _all field by default.
      • createCopyToContext

        public final ParseContext createCopyToContext()
        Return a new context that will be within a copy-to operation.
      • isWithinCopyTo

        public boolean isWithinCopyTo()
      • createMultiFieldContext

        public final ParseContext createMultiFieldContext()
        Return a new context that will be within multi-fields.
      • createNestedContext

        public final ParseContext createNestedContext​(java.lang.String fullPath)
        Return a new context that will be used within a nested document.
      • overridePath

        public final ParseContext overridePath​(ContentPath path)
        Return a new context that will have the provided path.
      • isWithinMultiFields

        public boolean isWithinMultiFields()
      • version

        public abstract org.apache.lucene.document.Field version()
      • version

        public abstract void version​(org.apache.lucene.document.Field version)
      • includeInAll

        public final boolean includeInAll​(java.lang.Boolean includeInAll,
                                          FieldMapper mapper)
      • allEntries

        public abstract AllEntries allEntries()
      • createExternalValueContext

        public final ParseContext createExternalValueContext​(java.lang.Object externalValue)
        Return a new context that will have the external value set.
      • externalValueSet

        public boolean externalValueSet()
      • externalValue

        public java.lang.Object externalValue()
      • parseExternalValue

        public final <T> T parseExternalValue​(java.lang.Class<T> clazz)
        Try to parse an externalValue if any
        Parameters:
        clazz - Expected class for external value
        Returns:
        null if no external value has been set or the value
      • addDynamicMapper

        public abstract void addDynamicMapper​(Mapper update)
        Add a new mapper dynamically created while parsing.
      • getDynamicMappers

        public abstract java.util.List<Mapper> getDynamicMappers()
        Get dynamic mappers created while parsing.