13.05.2014 Views

apache-solr-ref-guide-4.6.pdf

Create successful ePaper yourself

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

API Entry Points<br />

Related Topics<br />

/ collection /schema: retrieve the entire schema<br />

/ collection/schema/fields: retrieve information about all defined fields, or create new fields with optional copyField directives<br />

/ collection/schema/fields/<br />

name: retrieve information about a named field, or create a new named field with optional copyField directives<br />

/ collection/schema/dynamicfields: retrieve information about dynamic field rules<br />

/ collection/schema/dynamicfields/<br />

name: retrieve information about a named dynamic rule<br />

/ collection/schema/fieldtypes: retrieve information about field types<br />

/ collection/schema/fieldtypes/<br />

name: retrieve information about a named field type<br />

/ collection/schema/copyfields: retrieve information about copy fields, or create new copyField directives<br />

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

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

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

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

/ collection/schema/<strong>solr</strong>queryparser/defaultoperator: retrieve the default operator<br />

Retrieve schema information<br />

Retrieve the Entire Schema<br />

GET / collection/schema<br />

Input<br />

Path Parameters<br />

Key<br />

collection<br />

Description<br />

The collection (or core) name.<br />

Query Parameters<br />

The query parameters can be added to the API request after a '?'.<br />

Key Type Required Default Description<br />

wt string No json Defines the format of the response. The options are json, xml or schema.xml. If not specified, JSON will<br />

be returned by default.<br />

Output<br />

Output Content<br />

The output will include all fields, field types, dynamic rules and copy field rules. The schema name and version are also included.<br />

Examples<br />

Input<br />

Get the entire schema in JSON.<br />

curl http://localhost:8983/<strong>solr</strong>/collection1/schema?wt=json<br />

Get the entire schema in XML.<br />

curl http://localhost:8983/<strong>solr</strong>/collection1/schema?wt=xml<br />

Get the entire schema in "schema.xml" format.<br />

curl http://localhost:8983/<strong>solr</strong>/collection1/schema?wt=schema.xml<br />

Apache Solr Reference Guide 4.6<br />

42

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

Saved successfully!

Ooh no, something went wrong!