public abstract class DocTransformer extends Object
QueryElevationComponent
)
New instance for each request
TransformerFactory
Modifier and Type | Field and Description |
---|---|
protected ResultContext |
context |
Constructor and Description |
---|
DocTransformer() |
Modifier and Type | Method and Description |
---|---|
String[] |
getExtraRequestFields()
When a transformer needs access to fields that are not automatically derived from the
input fields names, this option lets us explicitly say the field names that we hope
will be in the SolrDocument.
|
abstract String |
getName() |
void |
setContext(ResultContext context)
This is called before transform and sets
|
String |
toString() |
abstract void |
transform(SolrDocument doc,
int docid,
float score)
This is where implementations do the actual work
|
protected ResultContext context
public abstract String getName()
public void setContext(ResultContext context)
context
- The ResultContext
stores information about how the documents were produced.public abstract void transform(SolrDocument doc, int docid, float score) throws IOException
doc
- The document to alterdocid
- The Lucene internal doc idscore
- the score for this documentIOException
- If there is a low-level I/O error.public String[] getExtraRequestFields()
SolrIndexSearcher
but may or may not be returned in the final
QueryResponseWriter
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.