Class SchemaRequest
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrRequest<T>
-
- org.apache.solr.client.solrj.request.schema.AbstractSchemaRequest<SchemaResponse>
-
- org.apache.solr.client.solrj.request.schema.SchemaRequest
-
- All Implemented Interfaces:
Serializable
public class SchemaRequest extends AbstractSchemaRequest<SchemaResponse>
This class offers access to the operations exposed by the Solr Schema API.Most of the operations of this class offer a very abstract interface avoiding in this manner eventual changes due to Solr Schema API updates. On the other hand, the creation of request parameters for creating new fields or field types can be tedious because it is not strongly typed (the user has to build on his own a
NamedListargument containing the field/field type properties).The class does not currently offer explicit support for the Schema API operations exposed through Managed Resources, but such operations can be built with little effort manually based on this class within the client applications.
This class is experimental and it is subject to change.
- Since:
- solr 5.3
- See Also:
- Solr Schema API, Solr managed resources, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSchemaRequest.AddCopyFieldAdds a new copy field rule to the schema of the specified collection.static classSchemaRequest.AddDynamicFieldAdds a new dynamic field rule to the schema of the specified collection.static classSchemaRequest.AddFieldAdds a new field definition to the schema.static classSchemaRequest.AddFieldTypeUpdate request used to add a new field type to the schema.static classSchemaRequest.CopyFieldsSchema API request that retrieves the source and destination of each copy field in the schema.static classSchemaRequest.DeleteCopyFieldDeletes a copy field rule from the schema of the specified collection.static classSchemaRequest.DeleteDynamicFieldDeletes a dynamic field rule from your schema.static classSchemaRequest.DeleteFieldRemoves a field definition from the schema.static classSchemaRequest.DeleteFieldTypeRemoves a field type from the schema of the specified collection.static classSchemaRequest.DynamicFieldSchema API request that lists the dynamic field definition for the specified field contained in the schema.static classSchemaRequest.DynamicFieldsSchema API request that lists the dynamic field definitions contained in the schema.static classSchemaRequest.FieldSchema API request that lists the field definition for the specified field contained in the schema.static classSchemaRequest.FieldsSchema API request class that lists the field definitions contained in the schema.static classSchemaRequest.FieldTypeSchema API request that retrieves the type definitions for the specified field type contained in the schema.static classSchemaRequest.FieldTypesSchema API request that lists the types definitions contained in the schema.static classSchemaRequest.GlobalSimilarityRetrieves the class name of the global similarity defined (if any) in the schema.static classSchemaRequest.MultiUpdateThe Schema API offers the possibility to perform one or more add requests in a single command.static classSchemaRequest.ReplaceDynamicFieldReplaces a dynamic field rule in the schema of the specified collection.static classSchemaRequest.ReplaceFieldReplaces a field's definition.static classSchemaRequest.ReplaceFieldTypeReplaces a field type in schema belonging to the schema of the specified collection.static classSchemaRequest.SchemaNameSchema API request class that can be used to retrieve the name of the schema.static classSchemaRequest.SchemaVersionSchema API request that can be used to retrieve the version of the schema for the specified collection.static classSchemaRequest.UniqueKeySchema API request that retrieves the field name that is defined as the uniqueKey for the index of the specified collection.static classSchemaRequest.Update-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS, useBinaryV2, usev2
-
-
Constructor Summary
Constructors Constructor Description SchemaRequest()Default constructor.SchemaRequest(SolrParams q)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SchemaResponsecreateResponse(SolrClient client)Create a new SolrResponse to hold the response from the server-
Methods inherited from class org.apache.solr.client.solrj.request.schema.AbstractSchemaRequest
getParams, getRequestType
-
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, addHeaders, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
-
-
-
-
Constructor Detail
-
SchemaRequest
public SchemaRequest()
Default constructor. It can be used to retrieve the entire schema.- See Also:
SolrRequest.process(SolrClient)
-
SchemaRequest
public SchemaRequest(SolrParams q)
-
-
Method Detail
-
createResponse
protected SchemaResponse createResponse(SolrClient client)
Description copied from class:SolrRequestCreate a new SolrResponse to hold the response from the server- Specified by:
createResponsein classSolrRequest<SchemaResponse>- Parameters:
client- theSolrClientthe request will be sent to
-
-