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
NamedList
argument 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 class
SchemaRequest.AddCopyField
Adds a new copy field rule to the schema of the specified collection.static class
SchemaRequest.AddDynamicField
Adds a new dynamic field rule to the schema of the specified collection.static class
SchemaRequest.AddField
Adds a new field definition to the schema.static class
SchemaRequest.AddFieldType
Update request used to add a new field type to the schema.static class
SchemaRequest.CopyFields
Schema API request that retrieves the source and destination of each copy field in the schema.static class
SchemaRequest.DeleteCopyField
Deletes a copy field rule from the schema of the specified collection.static class
SchemaRequest.DeleteDynamicField
Deletes a dynamic field rule from your schema.static class
SchemaRequest.DeleteField
Removes a field definition from the schema.static class
SchemaRequest.DeleteFieldType
Removes a field type from the schema of the specified collection.static class
SchemaRequest.DynamicField
Schema API request that lists the dynamic field definition for the specified field contained in the schema.static class
SchemaRequest.DynamicFields
Schema API request that lists the dynamic field definitions contained in the schema.static class
SchemaRequest.Field
Schema API request that lists the field definition for the specified field contained in the schema.static class
SchemaRequest.Fields
Schema API request class that lists the field definitions contained in the schema.static class
SchemaRequest.FieldType
Schema API request that retrieves the type definitions for the specified field type contained in the schema.static class
SchemaRequest.FieldTypes
Schema API request that lists the types definitions contained in the schema.static class
SchemaRequest.GlobalSimilarity
Retrieves the class name of the global similarity defined (if any) in the schema.static class
SchemaRequest.MultiUpdate
The Schema API offers the possibility to perform one or more add requests in a single command.static class
SchemaRequest.ReplaceDynamicField
Replaces a dynamic field rule in the schema of the specified collection.static class
SchemaRequest.ReplaceField
Replaces a field's definition.static class
SchemaRequest.ReplaceFieldType
Replaces a field type in schema belonging to the schema of the specified collection.static class
SchemaRequest.SchemaName
Schema API request class that can be used to retrieve the name of the schema.static class
SchemaRequest.SchemaVersion
Schema API request that can be used to retrieve the version of the schema for the specified collection.static class
SchemaRequest.UniqueKey
Schema API request that retrieves the field name that is defined as the uniqueKey for the index of the specified collection.static class
SchemaRequest.Update
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD
-
-
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 SchemaResponse
createResponse(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
-
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, 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:SolrRequest
Create a new SolrResponse to hold the response from the server- Specified by:
createResponse
in classSolrRequest<SchemaResponse>
- Parameters:
client
- theSolrClient
the request will be sent to
-
-