Class ScoreAugmenter
- java.lang.Object
-
- org.apache.solr.response.transform.DocTransformer
-
- org.apache.solr.response.transform.ScoreAugmenter
-
public class ScoreAugmenter extends DocTransformer
Simple Augmenter that adds the score- Since:
- solr 4.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.response.transform.DocTransformer
DocTransformer.NoopFieldTransformer
-
-
Field Summary
-
Fields inherited from class org.apache.solr.response.transform.DocTransformer
context
-
-
Constructor Summary
Constructors Constructor Description ScoreAugmenter(String display)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
void
transform(org.apache.solr.common.SolrDocument doc, int docid)
This is where implementations do the actual work.void
transform(org.apache.solr.common.SolrDocument doc, int docid, float score)
This is where implementations do the actual work.-
Methods inherited from class org.apache.solr.response.transform.DocTransformer
getExtraRequestFields, getRawFields, needsSolrIndexSearcher, setContext, toString
-
-
-
-
Constructor Detail
-
ScoreAugmenter
public ScoreAugmenter(String display)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in classDocTransformer
- Returns:
- The name of the transformer
-
transform
public void transform(org.apache.solr.common.SolrDocument doc, int docid, float score)
Description copied from class:DocTransformer
This is where implementations do the actual work. If implementations require a valid docId and index access, theDocTransformer.needsSolrIndexSearcher()
method must return trueDefault implementation calls
DocTransformer.transform(SolrDocument, int)
.- Overrides:
transform
in classDocTransformer
- Parameters:
doc
- The document to alterdocid
- The Lucene internal doc id, or -1 in cases where thedoc
did not come from the indexscore
- the score for this document- See Also:
DocTransformer.needsSolrIndexSearcher()
-
transform
public void transform(org.apache.solr.common.SolrDocument doc, int docid)
Description copied from class:DocTransformer
This is where implementations do the actual work. If implementations require a valid docId and index access, theDocTransformer.needsSolrIndexSearcher()
method must return true- Specified by:
transform
in classDocTransformer
- Parameters:
doc
- The document to alterdocid
- The Lucene internal doc id, or -1 in cases where thedoc
did not come from the index- See Also:
DocTransformer.needsSolrIndexSearcher()
-
-