|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.search.v2.lucene.boosting.BoostByModificationDateStrategy
public class BoostByModificationDateStrategy
A BoostingStrategy that boost the scores based on the modification date of scored document. Recently modified
Document get a higher boost.
| Field Summary | |
|---|---|
static java.lang.String |
MODIFIED_FIELD
|
| Constructor Summary | |
|---|---|
BoostByModificationDateStrategy()
|
|
| Method Summary | |
|---|---|
float |
boost(org.apache.lucene.index.IndexReader reader,
int asboluteDocId,
float score)
Apply a relevant boost to the specified document with the specified score. |
float |
boost(org.apache.lucene.index.IndexReader reader,
java.util.Map<java.lang.String,java.lang.Object> params,
int doc,
float score)
Apply a relevant boost to the specified document with the specified score. |
float |
boost(org.apache.lucene.index.IndexReader reader,
SearchQueryParameters searchQueryParameters,
int doc,
float score)
Apply a relevant boost to the specified document with the specified score. |
com.atlassian.confluence.search.v2.lucene.boosting.BoostByModificationDateStrategy.DateMilestone |
getDateMilestones()
|
void |
setDateMilestones(com.atlassian.confluence.search.v2.lucene.boosting.BoostByModificationDateStrategy.DateMilestone dateMilestones)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MODIFIED_FIELD
| Constructor Detail |
|---|
public BoostByModificationDateStrategy()
| Method Detail |
|---|
public float boost(org.apache.lucene.index.IndexReader reader,
int asboluteDocId,
float score)
throws java.io.IOException
BoostingStrategyApply a relevant boost to the specified document with the specified score. Returning a score of 0 will remove the document from the results.
Warning: This method needs to return extremely fast, so any I/O like using the index reader
to load the actual document is discouraged. If you need access to a documents field values you should rather
consider using a FieldCache instead.
boost in interface BoostingStrategyreader - a reader instance associated with the current scoring processasboluteDocId - the doc idscore - the original score for the document specified by doc
score to make no change to the score
- Throws:
java.io.IOException
public float boost(org.apache.lucene.index.IndexReader reader,
java.util.Map<java.lang.String,java.lang.Object> params,
int doc,
float score)
throws java.io.IOException
BoostingStrategyApply a relevant boost to the specified document with the specified score. Returning a score of 0 will remove the document from the results.
Warning: This method needs to return extremely fast, so any I/O like using the index reader
to load the actual document is discouraged. If you need access to a documents field values you should rather
consider using a FieldCache instead.
boost in interface BoostingStrategyreader - a reader instance associated with the current scoring processparams - extra state information used by more complex boosting strategiesdoc - the doc idscore - the original score for the document specified by doc
score to make no change to the score
- Throws:
java.io.IOException
public float boost(org.apache.lucene.index.IndexReader reader,
SearchQueryParameters searchQueryParameters,
int doc,
float score)
throws java.io.IOException
BoostingStrategyApply a relevant boost to the specified document with the specified score. Returning a score of 0 will remove the document from the results.
Warning: This method needs to return extremely fast, so any I/O like using the index reader
to load the actual document is discouraged. If you need access to a documents field values you should rather
consider using a FieldCache instead.
If you are implementing this method but do not use the searchQueryParameters, it is safe to delegate
directly to the boost(IndexReader, int, float) method.
boost in interface BoostingStrategyreader - a reader instance associated with the current scoring processsearchQueryParameters - extra state information used by more complex boosting strategiesdoc - the doc idscore - the original score for the document specified by doc, or score to make no change to the score
- Returns:
- the boosted score or 0 to remove the document from the results
- Throws:
java.io.IOExceptionpublic com.atlassian.confluence.search.v2.lucene.boosting.BoostByModificationDateStrategy.DateMilestone getDateMilestones()
public void setDateMilestones(com.atlassian.confluence.search.v2.lucene.boosting.BoostByModificationDateStrategy.DateMilestone dateMilestones)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||