Class InnerHitsContext.InnerHitSubContext

All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, Releasable
Enclosing class:
InnerHitsContext

public abstract static class InnerHitsContext.InnerHitSubContext
extends SubSearchContext
A SubSearchContext that associates TopDocs to each SearchHit in the parent search context
  • Field Details

  • Constructor Details

    • InnerHitSubContext

      protected InnerHitSubContext​(java.lang.String name, SearchContext context)
  • Method Details

    • topDocs

      public abstract TopDocsAndMaxScore topDocs​(SearchHit hit) throws java.io.IOException
      Throws:
      java.io.IOException
    • getName

      public java.lang.String getName()
    • innerHits

      public InnerHitsContext innerHits()
      Overrides:
      innerHits in class FilteredSearchContext
    • setChildInnerHits

      public void setChildInnerHits​(java.util.Map<java.lang.String,​InnerHitsContext.InnerHitSubContext> childInnerHits)
    • getInnerHitQueryWeight

      protected org.apache.lucene.search.Weight getInnerHitQueryWeight() throws java.io.IOException
      Throws:
      java.io.IOException
    • parentSearchContext

      public SearchContext parentSearchContext()
    • getRootId

      public Uid getRootId()
      The _id of the root document. Since this ID is available on the context, inner hits can avoid re-loading the root _id.
    • setRootId

      public void setRootId​(Uid rootId)
    • getRootLookup

      public SourceLookup getRootLookup()
      A source lookup for the root document. This shared lookup allows inner hits to avoid re-loading the root _source.
    • setRootLookup

      public void setRootLookup​(SourceLookup rootLookup)