public class PluggableBoostingStrategy extends Object implements BoostingStrategy
BoostingStrategy
implementations provided by any plugin. The boost is not applied in any
particular order.| Constructor and Description |
|---|
PluggableBoostingStrategy(ModuleDescriptorCache<LuceneBoostingStrategyModuleDescriptor> moduleDescriptorCache)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
float |
boost(org.apache.lucene.index.IndexReader reader,
int doc,
float score)
Deprecated.
Apply a relevant boost to the specified document with the specified score.
|
float |
boost(org.apache.lucene.index.IndexReader reader,
Map<String,Object> params,
int doc,
float score)
Deprecated.
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)
Deprecated.
Apply a relevant boost to the specified document with the specified score.
|
public PluggableBoostingStrategy(ModuleDescriptorCache<LuceneBoostingStrategyModuleDescriptor> moduleDescriptorCache)
public float boost(org.apache.lucene.index.IndexReader reader,
int doc,
float score)
throws 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 processdoc - the doc idscore - the original score for the document specified by docscore to make no change to the scoreIOExceptionpublic float boost(org.apache.lucene.index.IndexReader reader,
Map<String,Object> params,
int doc,
float score)
throws 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 docscore to make no change to the scoreIOExceptionpublic float boost(org.apache.lucene.index.IndexReader reader,
SearchQueryParameters searchQueryParameters,
int doc,
float score)
throws 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 scoreIOExceptionCopyright © 2003–2017 Atlassian. All rights reserved.