11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Multiple Commands in a Single POST<br />

Schema Changes among Replicas<br />

Retrieve Schema Information<br />

Retrieve the Entire Schema<br />

List Fields<br />

List Dynamic Fields<br />

List Field Types<br />

List Copy Fields<br />

Show Schema Name<br />

Show the Schema Version<br />

List UniqueKey<br />

Show Global Similarity<br />

Get the Default Query Operator<br />

Manage Resource Data<br />

API Entry Points<br />

/schema: retrieve the schema, or modify the schema to add, remove, or replace fields, dynamic fields, copy<br />

fields, or field types<br />

/schema/fields: retrieve information about all defined fields or a specific named field<br />

/schema/dynamicfields: retrieve information about all dynamic field rules or a specific named dynamic rule<br />

/schema/fieldtypes: retrieve information about all field types or a specific field type<br />

/schema/copyfields: retrieve information about copy fields<br />

/schema/name: retrieve the schema name<br />

/schema/version: retrieve the schema version<br />

/schema/uniquekey: retrieve the defined uniqueKey<br />

/schema/similarity: retrieve the global similarity definition<br />

/schema/solrqueryparser/defaultoperator: retrieve the default operator<br />

Modify the Schema<br />

POST / collection/schema<br />

To add, remove or replace fields, dynamic field rules, copy field rules, or new field types, you can send a POST<br />

request to the /collection/schema/ endpoint with a sequence of commands to perform the requested<br />

actions. The following commands are supported:<br />

add-field: add a new field with parameters you provide.<br />

delete-field: delete a field.<br />

replace-field: replace an existing field with one that is differently configured.<br />

add-dynamic-field: add a new dynamic field rule with parameters you provide.<br />

delete-dynamic-field: delete a dynamic field rule.<br />

replace-dynamic-field: replace an existing dynamic field rule with one that is differently configured.<br />

add-field-type: add a new field type with parameters you provide.<br />

delete-field-type: delete a field type.<br />

replace-field-type: replace an existing field type with one that is differently configured.<br />

add-copy-field: add a new copy field rule.<br />

delete-copy-field: delete a copy field rule.<br />

These commands can be issued in separate POST requests or in the same POST request. Commands are<br />

executed in the order in which they are specified.<br />

In each case, the response will include the status and the time to process the request, but will not include the<br />

entire schema.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!