Class FieldAnalysisRequest
java.lang.Object
org.apache.solr.client.solrj.SolrRequest<FieldAnalysisResponse>
org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest<FieldAnalysisResponse>
org.apache.solr.client.solrj.request.FieldAnalysisRequest
- All Implemented Interfaces:
Serializable
A request for the org.apache.solr.handler.FieldAnalysisRequestHandler.
- Since:
- solr.14
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType -
Field Summary
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new FieldAnalysisRequest with a default uri of "/fieldanalysis".Constructs a new FieldAnalysisRequest with a given uri. -
Method Summary
Modifier and TypeMethodDescriptionaddFieldName(String fieldName) Adds the given field name for analysis.addFieldType(String fieldTypeName) Adds the given field type for analysis.protected FieldAnalysisResponsecreateResponse(NamedList<Object> namedList) Create a new SolrResponse to hold the response from the server.Returns a list of field names the analysis should be performed on.Returns a list of field types the analysis should be performed on.Returns the field value that will be analyzed when this request is processed.The parameters for this request; never null.getQuery()Returns the query that will be analyzed.booleanReturns whether index time tokens that match query time tokens should be marked as a "match".setFieldNames(List<String> fieldNames) Sets the field names on which the analysis should be performed.setFieldTypes(List<String> fieldTypes) Sets the field types on which analysis should be performed.setFieldValue(String fieldValue) Sets the field value to be analyzed.Sets the query to be analyzed.setShowMatch(boolean showMatch) Sets whether index time tokens that match query time tokens should be marked as a "match".Methods inherited from class org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest
requiresCollectionMethods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal
-
Constructor Details
-
FieldAnalysisRequest
public FieldAnalysisRequest()Constructs a new FieldAnalysisRequest with a default uri of "/fieldanalysis". -
FieldAnalysisRequest
Constructs a new FieldAnalysisRequest with a given uri.- Parameters:
uri- the uri of the request handler.
-
-
Method Details
-
createResponse
Description copied from class:SolrRequestCreate a new SolrResponse to hold the response from the server. If the response extendsSolrResponse, then there's no need to use the arguments, asSolrResponse.setResponse(NamedList)will be called right after this method.- Specified by:
createResponsein classSolrRequest<FieldAnalysisResponse>- Parameters:
namedList- fromSolrClient.request(SolrRequest, String).
-
getParams
Description copied from class:SolrRequestThe parameters for this request; never null. The runtime type may be mutable but modifications may not affect thisSolrRequestinstance, as it may return a new instance here every time. If the subclass specifies the response type asModifiableSolrParams, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.- Specified by:
getParamsin classSolrRequest<FieldAnalysisResponse>
-
setFieldValue
Sets the field value to be analyzed.- Parameters:
fieldValue- The field value to be analyzed.- Returns:
- This FieldAnalysisRequest (fluent interface support).
-
getFieldValue
Returns the field value that will be analyzed when this request is processed.- Returns:
- The field value that will be analyzed when this request is processed.
-
setQuery
Sets the query to be analyzed. May benullindicated that no query analysis should take place.- Parameters:
query- The query to be analyzed.- Returns:
- This FieldAnalysisRequest (fluent interface support).
-
getQuery
Returns the query that will be analyzed. May returnnullindicating that no query analysis will be performed.- Returns:
- The query that will be analyzed. May return
nullindicating that no query analysis will be performed.
-
setShowMatch
Sets whether index time tokens that match query time tokens should be marked as a "match". By default, this is set tofalse. Obviously, this flag is ignored if when the query is set tonull.- Parameters:
showMatch- Sets whether index time tokens that match query time tokens should be marked as a "match".- Returns:
- This FieldAnalysisRequest (fluent interface support).
-
isShowMatch
public boolean isShowMatch()Returns whether index time tokens that match query time tokens should be marked as a "match".- Returns:
- Whether index time tokens that match query time tokens should be marked as a "match".
- See Also:
-
addFieldName
Adds the given field name for analysis.- Parameters:
fieldName- A field name on which the analysis should be performed.- Returns:
- this FieldAnalysisRequest (fluent interface support).
-
setFieldNames
Sets the field names on which the analysis should be performed.- Parameters:
fieldNames- The field names on which the analysis should be performed.- Returns:
- this FieldAnalysisRequest (fluent interface support).
-
getFieldNames
Returns a list of field names the analysis should be performed on. May returnnullindicating that no analysis will be performed on field names.- Returns:
- The field names the analysis should be performed on.
-
addFieldType
Adds the given field type for analysis.- Parameters:
fieldTypeName- A field type name on which analysis should be performed.- Returns:
- This FieldAnalysisRequest (fluent interface support).
-
setFieldTypes
Sets the field types on which analysis should be performed.- Parameters:
fieldTypes- The field type names on which analysis should be performed.- Returns:
- This FieldAnalysisRequest (fluent interface support).
-
getFieldTypes
Returns a list of field types the analysis should be performed on. May returnnullindicating that no analysis will be performed on field types.- Returns:
- The field types the analysis should be performed on.
-