Interface Searchable

  • All Superinterfaces:
    AutoCloseable, Closeable
    All Known Implementing Classes:
    IndexSearcher, MultiSearcher, ParallelMultiSearcher, Searcher

    @Deprecated
    public interface Searchable
    extends Closeable
    Deprecated.
    In 4.0 this interface is removed/absorbed into IndexSearcher
    The interface for search implementations.

    Searchable is the abstract network protocol for searching. Implementations provide search over a single index, over multiple indices, and over indices on remote servers.

    Queries, filters and sort criteria are designed to be compact so that they may be efficiently passed to a remote index, with only the top-scoring hits being returned, rather than every matching hit. NOTE: this interface is kept public for convenience. Since it is not expected to be implemented directly, it may be changed unexpectedly between releases.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
      Frees resources associated with this Searcher.
      Document doc​(int i)
      Deprecated.
      Returns the stored fields of document i.
      Document doc​(int n, FieldSelector fieldSelector)
      Deprecated.
      Get the Document at the nth position.
      int docFreq​(Term term)
      Deprecated.
      Expert: Returns the number of documents containing term.
      int[] docFreqs​(Term[] terms)
      Deprecated.
      Expert: For each term in the terms array, calculates the number of documents containing term.
      Explanation explain​(Weight weight, int doc)
      Deprecated.
      Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
      int maxDoc()
      Deprecated.
      Expert: Returns one greater than the largest possible document number.
      Query rewrite​(Query query)
      Deprecated.
      Expert: called to re-write queries into primitive queries.
      TopDocs search​(Weight weight, Filter filter, int n)
      Deprecated.
      Expert: Low-level search implementation.
      TopFieldDocs search​(Weight weight, Filter filter, int n, Sort sort)
      Deprecated.
      Expert: Low-level search implementation with arbitrary sorting.
      void search​(Weight weight, Filter filter, Collector collector)
      Deprecated.
      Lower-level search API.