Package org.apache.solr.search
Class ReturnFields
java.lang.Object
org.apache.solr.search.ReturnFields
- Direct Known Subclasses:
SolrReturnFields
A class representing the return fields
- Since:
- solr 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe explicitly requested field names (includes pseudo fields)Get the fields which have been renamedSet of field names with their exact names from the lucene index.getLuceneFieldNames(boolean ignoreWantsAll) Set of field names with their exact names from the lucene index.The requested field names (includes pseudo fields) that do not depend on a scoreThe requested field names (includes pseudo fields)A mapping of return fields that depend on score and the names they are associated with.abstract DocTransformerReturns the DocTransformer used to modify documents, ornullabstract booleanReturnstrueif the fieldnames should be picked with a patternabstract booleanReturnstrueif all fields should be returned to the external client.abstract booleanwantsField(String name) Returnstrueif the specified field should be returned to the external client -- either using its own name, or via an alias.abstract booleanReturnstrueif the score should be returned.
-
Constructor Details
-
ReturnFields
public ReturnFields()
-
-
Method Details
-
getLuceneFieldNames
Set of field names with their exact names from the lucene index. Class such as ResponseWriters pass this toSolrDocumentFetcher.doc(int, Set).NOTE: In some situations, this method may return
nulleven ifwantsAllFields()isfalse. For example: When glob expressions are used (hasPatternMatching()), it is safer to request all field names then to attempt to resolve the globs against all possible dynamic field names in the index.- Returns:
- Set of field names or
null(all fields).
-
getLuceneFieldNames
Set of field names with their exact names from the lucene index.- Parameters:
ignoreWantsAll- If true, it returns any additional specified field names, in spite of also wanting all fields. Example: when fl=*,field1, returns ["field1"]. If false, the method returns null when all fields are wanted. Example: when fl=*,field1, returns null. Note that this method returns null regardless of ignoreWantsAll if all fields are requested and no explicit field names are specified.
-
getRequestedFieldNames
The requested field names (includes pseudo fields)- Returns:
- Set of field names or
null(all fields).
-
getExplicitlyRequestedFieldNames
The explicitly requested field names (includes pseudo fields)- Returns:
- Set of explicitly requested field names or
null(no explict)
-
getFieldRenames
Get the fields which have been renamed- Returns:
- a mapping of renamed fields
-
getScoreDependentReturnFields
A mapping of return fields that depend on score and the names they are associated with.- Returns:
- a mapping from return field name to the string representation of its definition
-
getNonScoreDependentReturnFieldNames
The requested field names (includes pseudo fields) that do not depend on a score- Returns:
- Set of field names or
null(all fields).
-
wantsField
Returnstrueif the specified field should be returned to the external client -- either using its own name, or via an alias. This method returnsfalseeven if the specified name is needed as an "extra" field for use by transformers. -
wantsAllFields
public abstract boolean wantsAllFields()Returnstrueif all fields should be returned to the external client. -
wantsScore
public abstract boolean wantsScore()Returnstrueif the score should be returned. -
hasPatternMatching
public abstract boolean hasPatternMatching()Returnstrueif the fieldnames should be picked with a pattern -
getTransformer
Returns the DocTransformer used to modify documents, ornull
-