com.atlassian.confluence.search.contentnames.lucene
Class ScoringPrefixFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by com.atlassian.confluence.search.contentnames.lucene.BaseScoringFilter
          extended by com.atlassian.confluence.search.contentnames.lucene.ScoringPrefixFilter

public class ScoringPrefixFilter
extends BaseScoringFilter

Filters by prefix and increments the score for each document that passes the filter.

If a document passes the filter and the document term is exactly the same as the filter term then the score gets an extra increment.


Field Summary
 
Fields inherited from class com.atlassian.confluence.search.contentnames.lucene.BaseScoringFilter
resultScores
 
Constructor Summary
ScoringPrefixFilter(org.apache.lucene.index.Term term)
          Construct a new filter that will update score in the supplied DocumentScores.
ScoringPrefixFilter(org.apache.lucene.index.Term term, byte scorePerMatch)
          Construct a new ScoringTermFilter that will modify the supplied scores.
 
Method Summary
 org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context, org.apache.lucene.util.Bits acceptDocs)
           
 
Methods inherited from class com.atlassian.confluence.search.contentnames.lucene.BaseScoringFilter
setResultScores
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoringPrefixFilter

public ScoringPrefixFilter(org.apache.lucene.index.Term term)
Construct a new filter that will update score in the supplied DocumentScores.

Parameters:
term -

ScoringPrefixFilter

public ScoringPrefixFilter(org.apache.lucene.index.Term term,
                           byte scorePerMatch)
Construct a new ScoringTermFilter that will modify the supplied scores.

Parameters:
term - the Term to filter against.
scorePerMatch - number of points per match
Method Detail

getDocIdSet

public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context,
                                                     org.apache.lucene.util.Bits acceptDocs)
                                              throws java.io.IOException
Specified by:
getDocIdSet in class org.apache.lucene.search.Filter
Throws:
java.io.IOException


Copyright © 2003-2014 Atlassian. All Rights Reserved.