Class AnalysisResponseBase
java.lang.Object
org.apache.solr.client.solrj.SolrResponse
org.apache.solr.client.solrj.response.SolrResponseBase
org.apache.solr.client.solrj.response.AnalysisResponseBase
- All Implemented Interfaces:
Serializable,MapSerializable,MapWriter,NavigableObject,org.noggit.JSONWriter.Writable
- Direct Known Subclasses:
DocumentAnalysisResponse,FieldAnalysisResponse
A base class for all analysis responses.
- Since:
- solr 1.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA phase in the analysis process.static classHolds all information of a token as part of an analysis phase.Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AnalysisResponseBase.AnalysisPhase> buildPhases(NamedList<Object> phaseNL) Parses the given named list and builds a list of analysis phases form it.protected AnalysisResponseBase.TokenInfobuildTokenInfo(NamedList<?> tokenNL) Parses the given named list and builds a token from it.protected AnalysisResponseBase.TokenInfobuildTokenInfoFromString(String value) Convert a string value (from CharacterFilter) into a TokenInfo for its value full span.Methods inherited from class org.apache.solr.client.solrj.response.SolrResponseBase
getElapsedTime, getQTime, getRequestUrl, getResponse, getResponseHeader, getStatus, setElapsedTime, setRequestUrl, setResponse, toString, writeMapMethods inherited from class org.apache.solr.client.solrj.SolrResponse
getExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
-
Constructor Details
-
AnalysisResponseBase
public AnalysisResponseBase()
-
-
Method Details
-
buildPhases
Parses the given named list and builds a list of analysis phases form it. Expects a named list of the form:
The special case is a CharacterFilter that just returns a string, which we then map to a single token without type.<lst name="index"> <arr name="Tokenizer"> <str name="text">the_text</str> <str name="rawText">the_raw_text</str> (optional) <str name="type">the_type</str> <int name="start">1</str> <int name="end">3</str> <int name="position">1</str> <bool name="match">true | false</bool> (optional) </arr> <arr name="Filter1"> <str name="text">the_text</str> <str name="rawText">the_raw_text</str> (optional) <str name="type">the_type</str> <int name="start">1</str> <int name="end">3</str> <int name="position">1</str> <bool name="match">true | false</bool> (optional) </arr> ... </lst>- Parameters:
phaseNL- The names list to parse.- Returns:
- The built analysis phases list.
-
buildTokenInfoFromString
Convert a string value (from CharacterFilter) into a TokenInfo for its value full span.- Parameters:
value- String value- Returns:
- The built token info (with type set to null)
-
buildTokenInfo
Parses the given named list and builds a token from it. Expects a named list of the form:
<arr name="Tokenizer"> <str name="text">the_text</str> <str name="rawText">the_raw_text</str> (optional) <str name="type">the_type</str> <int name="start">1</str> <int name="end">3</str> <int name="position">1</str> <bool name="match">true | false</bool> (optional) </arr>- Parameters:
tokenNL- The named list to parse.- Returns:
- The built token info.
-