public abstract class DocTransformer extends Object
QueryElevationComponent
)
New instance for each request
TransformerFactory
Modifier and Type | Field and Description |
---|---|
protected TransformContext |
context |
Constructor and Description |
---|
DocTransformer() |
Modifier and Type | Method and Description |
---|---|
String[] |
getExtraRequestFields()
When a transformer needs access to fields that are not automaticaly 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(TransformContext context)
This is called before transform and sets
|
String |
toString() |
abstract void |
transform(SolrDocument doc,
int docid)
This is where implementations do the actual work
|
protected TransformContext context
public abstract String getName()
public void setContext(TransformContext context)
context
- The TransformContext
stores information about the current state of things in Solr that may be
useful for doing transformations.public abstract void transform(SolrDocument doc, int docid) throws IOException
doc
- The document to alterdocid
- The Lucene internal doc idIOException
- 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-2015 Apache Software Foundation. All Rights Reserved.