11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<br />

0<br />

2<br />

<br />

<br />

<br />

5<br />

3<br />

3<br />

3<br />

3<br />

3<br />

3<br />

3<br />

3<br />

3<br />

<br />

<br />

<br />

Get First 10 Terms Starting with Letter 'a'<br />

This query requests the first ten terms in the name field, in index order (instead of the top 10 results by document<br />

count): http://localhost:8983/solr/techproducts/terms?terms.fl=name&terms.lower=a&ter<br />

ms.sort=index<br />

Results:<br />

<br />

<br />

0<br />

0<br />

<br />

<br />

<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

<br />

<br />

<br />

Using the Terms Component for an Auto-Suggest Feature<br />

If the Suggester doesn't suit your needs, you can use the Terms component in <strong>Solr</strong> to build a similar feature for<br />

your own search application. Simply submit a query specifying whatever characters the user has typed so far as<br />

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

381

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

Saved successfully!

Ooh no, something went wrong!