Interface SourceProvider

All Known Implementing Classes:
SearchLookup

public interface SourceProvider
Provides access to the Source of a document
  • Method Summary

    Modifier and Type
    Method
    Description
    A SourceProvider that loads source from stored fields The returned SourceProvider is thread-safe across segments, in that it may be safely used by a searcher that searches different segments on different threads, but it is not safe to use this to access documents from the same segment across multiple threads.
    A SourceProvider that loads source from synthetic source The returned SourceProvider is thread-safe across segments, in that it may be safely used by a searcher that searches different segments on different threads, but it is not safe to use this to access documents from the same segment across multiple threads.
    getSource(org.apache.lucene.index.LeafReaderContext ctx, int doc)
    Get the Source for the given doc within the given context
  • Method Details

    • getSource

      Source getSource(org.apache.lucene.index.LeafReaderContext ctx, int doc) throws IOException
      Get the Source for the given doc within the given context
      Throws:
      IOException
    • fromStoredFields

      static SourceProvider fromStoredFields()
      A SourceProvider that loads source from stored fields The returned SourceProvider is thread-safe across segments, in that it may be safely used by a searcher that searches different segments on different threads, but it is not safe to use this to access documents from the same segment across multiple threads.
    • fromSyntheticSource

      static SourceProvider fromSyntheticSource(Mapping mapping)
      A SourceProvider that loads source from synthetic source The returned SourceProvider is thread-safe across segments, in that it may be safely used by a searcher that searches different segments on different threads, but it is not safe to use this to access documents from the same segment across multiple threads.