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.

<br />

id<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

...<br />

<br />

<br />

<br />

<br />

List Fields<br />

GET / collection/schema/fields<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 or xml. If not specified, JSON will be returned by<br />

default.<br />

Output<br />

Output Content<br />

The output will include each field and any defined configuration for each field. The defined configuration can vary for each field, but will minimally<br />

include the field name, the type, if it is indexed and if it is stored. If multiValued is defined as either true or false (most likely true), that will<br />

also be shown. See the section Defining Fields for more information about each parameter.<br />

Examples<br />

Input<br />

Get a list of all fields.<br />

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

Output<br />

The sample output below has been truncated to only show a few fields.<br />

Apache Solr Reference Guide 4.6<br />

46

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

Saved successfully!

Ooh no, something went wrong!