Areek Zillur created SOLR-5529:
----------------------------------
Summary: Add Support for queries to use multiple suggesters (new
Suggester Component)
Key: SOLR-5529
URL: https://issues.apache.org/jira/browse/SOLR-5529
Project: Solr
Issue Type: Improvement
Components: SearchComponents - other
Affects Versions: 5.0, 4.7
Reporter: Areek Zillur
Fix For: 5.0, 4.7
Following the discussion on SOLR-5528. It would be nice to support suggest
queries to be processed by more than one suggesters configured in one suggest
component.
The new response format is as follows:
{code}
{
responseHeader: {
status: 0,
QTime: 45
},
suggest: {
suggester1: {
e: {
numFound: 1,
suggestions: [
{
term: "electronics and computer1",
weight: 100,
payload: ""
}
]
}
},
suggester2: {
e: {
numFound: 1,
suggestions: [
{
term: "electronics and computer1",
weight: 10,
payload: ""
}
]
}
}
}
}
{code}
where 'suggest1' and 'suggest2' are the names of the configured suggester and
'e' is the query.
Example configuration:
{code}
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">suggester1</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">string</str>
</lst>
<lst name="suggester">
<str name="name">suggester2</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">name</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">string</str>
</lst>
</searchComponent>
{code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]