Class ValueSourceAugmenter
java.lang.Object
org.apache.solr.response.transform.DocTransformer
org.apache.solr.response.transform.ValueSourceAugmenter
Add values from a ValueSource (function query etc)
NOT really sure how or if this could work...
- Since:
- solr 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classFake scorer for a single documentNested classes/interfaces inherited from class org.apache.solr.response.transform.DocTransformer
DocTransformer.NoopFieldTransformer -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal QParserfinal org.apache.lucene.queries.function.ValueSourceFields inherited from class org.apache.solr.response.transform.DocTransformer
context -
Constructor Summary
ConstructorsConstructorDescriptionValueSourceAugmenter(String name, QParser qparser, org.apache.lucene.queries.function.ValueSource valueSource) -
Method Summary
Modifier and TypeMethodDescriptiongetName()booleanAlways returns truevoidsetContext(ResultContext context) This is called beforeDocTransformer.transform(org.apache.solr.common.SolrDocument, int, org.apache.solr.search.DocIterationInfo)to provide context for any subsequent transformations.protected voidvoidtransform(org.apache.solr.common.SolrDocument doc, int docid, DocIterationInfo docIterationInfo) This is where implementations do the actual work.Methods inherited from class org.apache.solr.response.transform.DocTransformer
getExtraRequestFields, getRawFields, toString
-
Field Details
-
name
-
qparser
-
valueSource
public final org.apache.lucene.queries.function.ValueSource valueSource
-
-
Constructor Details
-
ValueSourceAugmenter
-
-
Method Details
-
getName
- Specified by:
getNamein classDocTransformer- Returns:
- The name of the transformer
-
setContext
Description copied from class:DocTransformerThis is called beforeDocTransformer.transform(org.apache.solr.common.SolrDocument, int, org.apache.solr.search.DocIterationInfo)to provide context for any subsequent transformations.- Overrides:
setContextin classDocTransformer- Parameters:
context- TheResultContextstores information about how the documents were produced.- See Also:
-
transform
public void transform(org.apache.solr.common.SolrDocument doc, int docid, DocIterationInfo docIterationInfo) Description copied from class:DocTransformerThis is where implementations do the actual work. If implementations require a valid docId and index access, theDocTransformer.needsSolrIndexSearcher()method must return true- Specified by:
transformin classDocTransformer- Parameters:
doc- The document to alterdocid- The Lucene internal doc id, or -1 in cases where thedocdid not come from the indexdocIterationInfo- the document information for this document, including the score. Do not passnull, instead useDocIterationInfo.NONE.- See Also:
-
needsSolrIndexSearcher
public boolean needsSolrIndexSearcher()Always returns true- Overrides:
needsSolrIndexSearcherin classDocTransformer- See Also:
-
setValue
-