public class ValueSourceAugmenter extends DocTransformer
DocTransformer.NoopFieldTransformer| 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() |
boolean |
needsSolrIndexSearcher()
Always returns true
|
void |
setContext(ResultContext context)
This is called before
DocTransformer.transform(org.apache.solr.common.SolrDocument, int, float) to provide context for any subsequent transformations. |
protected void |
setValue(SolrDocument doc,
Object val) |
void |
transform(SolrDocument doc,
int docid)
This is where implementations do the actual work.
|
getExtraRequestFields, toString, transformpublic 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 DocTransformerpublic void setContext(ResultContext context)
DocTransformerDocTransformer.transform(org.apache.solr.common.SolrDocument, int, float) to provide context for any subsequent transformations.setContext in class DocTransformercontext - The ResultContext stores information about how the documents were produced.DocTransformer.needsSolrIndexSearcher()public void transform(SolrDocument doc, int docid)
DocTransformerDocTransformer.needsSolrIndexSearcher()
method must return truetransform in class DocTransformerdoc - The document to alterdocid - The Lucene internal doc id, or -1 in cases where the doc did not come from the indexDocTransformer.needsSolrIndexSearcher()public boolean needsSolrIndexSearcher()
needsSolrIndexSearcher in class DocTransformerResultContext.getSearcher(),
DocTransformer.transform(org.apache.solr.common.SolrDocument, int, float)protected void setValue(SolrDocument doc, Object val)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.