org.apache.lucene.search
Class DateFilterScoringSearcher

java.lang.Object
  extended byorg.apache.lucene.search.Searcher
      extended byorg.apache.lucene.search.IndexSearcher
          extended byorg.apache.lucene.search.DelayCloseIndexSearcher
              extended byorg.apache.lucene.search.DateFilterScoringSearcher
All Implemented Interfaces:
FilterCountingSearcher, Remote, Searchable

public class DateFilterScoringSearcher
extends DelayCloseIndexSearcher
implements FilterCountingSearcher

A Searcher that boosts results by age (newer documents get a higher boost).


Constructor Summary
DateFilterScoringSearcher(Directory directory)
           
 
Method Summary
 Explanation explain(Query query, int doc)
          Deprecated. Deprecated in Lucene 1.9.1
 int[] getFilteredCounts()
           
 void resetFilteredCounts()
          Reset the number of filtered hits.
 void search(Query query, Filter filter, HitCollector results)
          Deprecated. Deprecated in Lucene 1.9.1
 TopDocs search(Query query, Filter filter, int nDocs)
          Deprecated. Deprecated in Lucene 1.9.1
 TopFieldDocs search(Query query, Filter filter, int nDocs, Sort sort)
          Deprecated. Deprecated in Lucene 1.9.1
 void search(Weight weight, Filter filter, HitCollector results)
          Copied the implementation of IndexSearcher.search(Weight weight, Filter filter, final HitCollector results) (Lucene 1.9.1) in order to add logic to increment filter count.
 void setBoostByAge(boolean boostByAge)
           
 
Methods inherited from class org.apache.lucene.search.DelayCloseIndexSearcher
close, closeWhenDone, isClosed, isCurrent, open
 
Methods inherited from class org.apache.lucene.search.IndexSearcher
doc, docFreq, explain, getIndexReader, maxDoc, rewrite, search, search
 
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs, getSimilarity, search, search, search, search, search, setSimilarity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFilterScoringSearcher

public DateFilterScoringSearcher(Directory directory)
                          throws IOException
Method Detail

resetFilteredCounts

public void resetFilteredCounts()
Reset the number of filtered hits.

Specified by:
resetFilteredCounts in interface FilterCountingSearcher

search

public void search(Weight weight,
                   Filter filter,
                   HitCollector results)
            throws IOException
Copied the implementation of IndexSearcher.search(Weight weight, Filter filter, final HitCollector results) (Lucene 1.9.1) in order to add logic to increment filter count. The logical method to override is search(Query query, Filter filter), but the implementation of this does not allow us to slip in filter incrementation logic.

Specified by:
search in interface Searchable
Throws:
IOException

search

public TopDocs search(Query query,
                      Filter filter,
                      int nDocs)
               throws IOException
Deprecated. Deprecated in Lucene 1.9.1

modify scores of hits based on whether they conform to date range, and also perform boosting based on age of doc

Specified by:
search in interface Searchable
Throws:
IOException

search

public TopFieldDocs search(Query query,
                           Filter filter,
                           int nDocs,
                           Sort sort)
                    throws IOException
Deprecated. Deprecated in Lucene 1.9.1

Specified by:
search in interface Searchable
Throws:
IOException

search

public void search(Query query,
                   Filter filter,
                   HitCollector results)
            throws IOException
Deprecated. Deprecated in Lucene 1.9.1

Specified by:
search in interface Searchable
Throws:
IOException

getFilteredCounts

public int[] getFilteredCounts()
Specified by:
getFilteredCounts in interface FilterCountingSearcher

explain

public Explanation explain(Query query,
                           int doc)
                    throws IOException
Deprecated. Deprecated in Lucene 1.9.1

Specified by:
explain in interface Searchable
Throws:
IOException

setBoostByAge

public void setBoostByAge(boolean boostByAge)


Confluence is developed by Atlassian.