public class ValueSourceAugmenter extends DocTransformer
Modifier and Type | Field and Description |
---|---|
String |
name |
QParser |
qparser |
ValueSource |
valueSource |
context
Constructor and Description |
---|
ValueSourceAugmenter(String name,
QParser qparser,
ValueSource valueSource) |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
void |
setContext(ResultContext context)
This is called before transform and sets
|
protected void |
setValue(SolrDocument doc,
Object val) |
void |
transform(SolrDocument doc,
int docid,
float score)
This is where implementations do the actual work
|
getExtraRequestFields, toString
public final String name
public final QParser qparser
public final ValueSource valueSource
public ValueSourceAugmenter(String name, QParser qparser, ValueSource valueSource)
public String getName()
getName
in class DocTransformer
public void setContext(ResultContext context)
DocTransformer
setContext
in class DocTransformer
context
- The ResultContext
stores information about how the documents were produced.public void transform(SolrDocument doc, int docid, float score)
DocTransformer
transform
in class DocTransformer
doc
- The document to alterdocid
- The Lucene internal doc idscore
- the score for this documentprotected void setValue(SolrDocument doc, Object val)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.