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.

definitions to be used.<br />

Example response:<br />

{<br />

}<br />

"responseHeader": {<br />

"status": 0,<br />

"QTime": 3<br />

},<br />

"suggest": {<br />

"mySuggester": {<br />

"elec": {<br />

"numFound": 1,<br />

"suggestions": [<br />

{<br />

"term": "electronics and computer1",<br />

"weight": 100,<br />

"payload": ""<br />

}<br />

]<br />

}<br />

},<br />

"altSuggester": {<br />

"elec": {<br />

"numFound": 1,<br />

"suggestions": [<br />

{<br />

"term": "electronics and computer1",<br />

"weight": 10,<br />

"payload": ""<br />

}<br />

]<br />

}<br />

}<br />

}<br />

Context Filtering<br />

Context filtering lets you filter suggestions by a separate context field, such as category, department or any other<br />

token. The AnalyzingInfixLookupFactory and BlendedInfixLookupFactory currently support this feature, when<br />

backed by DocumentDictionaryFactory.<br />

Add contextField to your suggester configuration. This example will suggest names and allow to filter by<br />

category:<br />

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

344

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

Saved successfully!

Ooh no, something went wrong!