Class DelegateSearcher

java.lang.Object
org.apache.lucene.search.IndexSearcher
com.atlassian.jira.lucene.internal.index.DelegateSearcher
All Implemented Interfaces:
Supplier<org.apache.lucene.search.IndexSearcher>
Direct Known Subclasses:
ManagedIndexSearcher, UnmanagedIndexSearcher

@Deprecated(since="10.4", forRemoval=true) public class DelegateSearcher extends org.apache.lucene.search.IndexSearcher implements Supplier<org.apache.lucene.search.IndexSearcher>
Deprecated, for removal: This API element is subject to removal in a future version.
since 10.4, for removal. Usage should be replaced with IndexSearcher.
Override all searcher methods and delegate to another IndexSearcher.

Note, this is fragile extension. We need to check each time we update Lucene that new superclass methods have been added and override them too!

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.search.IndexSearcher

    org.apache.lucene.search.IndexSearcher.LeafSlice
  • Field Summary

    Fields inherited from class org.apache.lucene.search.IndexSearcher

    leafContexts, leafSlices, readerContext
  • Constructor Summary

    Constructors
    Constructor
    Description
    DelegateSearcher(@NotNull org.apache.lucene.search.IndexSearcher indexSearcher)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.search.CollectionStatistics
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    count(org.apache.lucene.search.Query query)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.Weight
    createNormalizedWeight(org.apache.lucene.search.Query query, boolean needsScores)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.Weight
    createWeight(org.apache.lucene.search.Query query, boolean needsScores, float boost)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.document.Document
    doc(int i)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.document.Document
    doc(int n, Set<String> fieldsToLoad)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    doc(int n, org.apache.lucene.index.StoredFieldVisitor fieldVisitor)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.Explanation
    explain(org.apache.lucene.search.Query query, int doc)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected org.apache.lucene.search.Explanation
    explain(org.apache.lucene.search.Weight weight, int doc)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.IndexSearcher
    get()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Produce an object.
    org.apache.lucene.index.IndexReader
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.QueryCache
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.QueryCachingPolicy
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.similarities.Similarity
    getSimilarity(boolean needsScores)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.index.IndexReaderContext
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.Query
    rewrite(org.apache.lucene.search.Query query)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    search(List<org.apache.lucene.index.LeafReaderContext> leaves, org.apache.lucene.search.Weight weight, org.apache.lucene.search.Collector collector)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopDocs
    search(org.apache.lucene.search.Query query, int n)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopFieldDocs
    search(org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopFieldDocs
    search(org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort, boolean doDocScores, boolean doMaxScore)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    search(org.apache.lucene.search.Query query, org.apache.lucene.search.Collector results)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    <C extends org.apache.lucene.search.Collector, T>
    T
    search(org.apache.lucene.search.Query query, org.apache.lucene.search.CollectorManager<C,T> collectorManager)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopDocs
    searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int numHits)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopDocs
    searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TopFieldDocs
    searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int numHits, org.apache.lucene.search.Sort sort, boolean doDocScores, boolean doMaxScore)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setQueryCache(org.apache.lucene.search.QueryCache queryCache)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setQueryCachingPolicy(org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setSimilarity(org.apache.lucene.search.similarities.Similarity similarity)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected org.apache.lucene.search.IndexSearcher.LeafSlice[]
    slices(List<org.apache.lucene.index.LeafReaderContext> leaves)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.lucene.search.TermStatistics
    termStatistics(org.apache.lucene.index.Term term, org.apache.lucene.index.TermContext context)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.apache.lucene.search.IndexSearcher

    getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, setDefaultQueryCache, setDefaultQueryCachingPolicy

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DelegateSearcher

      public DelegateSearcher(@NotNull @NotNull org.apache.lucene.search.IndexSearcher indexSearcher)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • get

      public org.apache.lucene.search.IndexSearcher get()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Supplier
      Produce an object. Retrieve an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
      Specified by:
      get in interface Supplier<org.apache.lucene.search.IndexSearcher>
      Returns:
      the product, may be null if there are no objects available.
    • getIndexReader

      public org.apache.lucene.index.IndexReader getIndexReader()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getIndexReader in class org.apache.lucene.search.IndexSearcher
    • setQueryCache

      public void setQueryCache(org.apache.lucene.search.QueryCache queryCache)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      setQueryCache in class org.apache.lucene.search.IndexSearcher
    • getQueryCache

      public org.apache.lucene.search.QueryCache getQueryCache()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getQueryCache in class org.apache.lucene.search.IndexSearcher
    • setQueryCachingPolicy

      public void setQueryCachingPolicy(org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      setQueryCachingPolicy in class org.apache.lucene.search.IndexSearcher
    • getQueryCachingPolicy

      public org.apache.lucene.search.QueryCachingPolicy getQueryCachingPolicy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getQueryCachingPolicy in class org.apache.lucene.search.IndexSearcher
    • slices

      protected org.apache.lucene.search.IndexSearcher.LeafSlice[] slices(List<org.apache.lucene.index.LeafReaderContext> leaves)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      slices in class org.apache.lucene.search.IndexSearcher
    • createNormalizedWeight

      public org.apache.lucene.search.Weight createNormalizedWeight(org.apache.lucene.search.Query query, boolean needsScores) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      createNormalizedWeight in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • createWeight

      public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Query query, boolean needsScores, float boost) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      createWeight in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • getTopReaderContext

      public org.apache.lucene.index.IndexReaderContext getTopReaderContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getTopReaderContext in class org.apache.lucene.search.IndexSearcher
    • termStatistics

      public org.apache.lucene.search.TermStatistics termStatistics(org.apache.lucene.index.Term term, org.apache.lucene.index.TermContext context) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      termStatistics in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • collectionStatistics

      public org.apache.lucene.search.CollectionStatistics collectionStatistics(String field) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      collectionStatistics in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • doc

      public org.apache.lucene.document.Document doc(int n, Set<String> fieldsToLoad) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doc in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • doc

      public void doc(int n, org.apache.lucene.index.StoredFieldVisitor fieldVisitor) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doc in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • doc

      public org.apache.lucene.document.Document doc(int i) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doc in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • equals

      public boolean equals(Object obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • explain

      public org.apache.lucene.search.Explanation explain(org.apache.lucene.search.Query query, int doc) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      explain in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • explain

      protected org.apache.lucene.search.Explanation explain(org.apache.lucene.search.Weight weight, int doc) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      explain in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • getSimilarity

      public org.apache.lucene.search.similarities.Similarity getSimilarity(boolean needsScores)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getSimilarity in class org.apache.lucene.search.IndexSearcher
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.search.Query query) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      rewrite in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • count

      public int count(org.apache.lucene.search.Query query) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      count in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      public org.apache.lucene.search.TopFieldDocs search(org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      public org.apache.lucene.search.TopDocs search(org.apache.lucene.search.Query query, int n) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      public void search(org.apache.lucene.search.Query query, org.apache.lucene.search.Collector results) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      public org.apache.lucene.search.TopFieldDocs search(org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort, boolean doDocScores, boolean doMaxScore) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      public <C extends org.apache.lucene.search.Collector, T> T search(org.apache.lucene.search.Query query, org.apache.lucene.search.CollectorManager<C,T> collectorManager) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • search

      protected void search(List<org.apache.lucene.index.LeafReaderContext> leaves, org.apache.lucene.search.Weight weight, org.apache.lucene.search.Collector collector) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      search in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • searchAfter

      public org.apache.lucene.search.TopDocs searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int numHits) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      searchAfter in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • searchAfter

      public org.apache.lucene.search.TopDocs searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int n, org.apache.lucene.search.Sort sort) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      searchAfter in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • searchAfter

      public org.apache.lucene.search.TopFieldDocs searchAfter(org.apache.lucene.search.ScoreDoc after, org.apache.lucene.search.Query query, int numHits, org.apache.lucene.search.Sort sort, boolean doDocScores, boolean doMaxScore) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      searchAfter in class org.apache.lucene.search.IndexSearcher
      Throws:
      IOException
    • setSimilarity

      public void setSimilarity(org.apache.lucene.search.similarities.Similarity similarity)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      setSimilarity in class org.apache.lucene.search.IndexSearcher
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class org.apache.lucene.search.IndexSearcher