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.

a prefix. For example, if the user has typed "at", the search engine's interface would submit the following query:<br />

http://localhost:8983/solr/techproducts/terms?terms.fl=name&terms.prefix=at<br />

Result:<br />

<br />

<br />

0<br />

1<br />

<br />

<br />

<br />

1<br />

1<br />

<br />

<br />

<br />

You can use the parameter omitHeader=true to omit the response header from the query response, like in<br />

this example, which also returns the response in JSON format: http://localhost:8983/solr/techprodu<br />

cts/terms?terms.fl=name&terms.prefix=at&indent=true&wt=json&omitHeader=true<br />

Result:<br />

{<br />

}<br />

"terms": {<br />

"name": [<br />

"ata",<br />

1,<br />

"ati",<br />

1<br />

]<br />

}<br />

Distributed Search Support<br />

The TermsComponent also supports distributed indexes. For the /terms request handler, you must provide the<br />

following two parameters:<br />

Parameter<br />

shards<br />

shards.qt<br />

Description<br />

Specifies the shards in your distributed indexing configuration. For more information about<br />

distributed indexing, see Distributed Search with Index Sharding.<br />

Specifies the request handler <strong>Solr</strong> uses for requests to shards.<br />

More Resources<br />

TermsComponent wiki page<br />

TermsComponent javadoc<br />

The Term Vector Component<br />

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

382

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

Saved successfully!

Ooh no, something went wrong!