[ 
https://issues.apache.org/jira/browse/SOLR-5529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867864#comment-13867864
 ] 

Robert Muir commented on SOLR-5529:
-----------------------------------

The format change looks fine to me.

If we want to support multiple suggesters ever, we should do this before 4.7 is 
released, otherwise it will get more difficult because of backwards 
compatibility.

[~erickerickson] do you have any thoughts? I think you had raised thoughts on 
this feature before.


> 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
>
>         Attachments: SOLR-5529.patch, SOLR-5529.patch
>
>
> 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: 3
>     },
>     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 query:
> {code}
> localhost:8983/solr/suggest?suggest=true&suggest.dictionary=suggest1&suggest.dictionary=suggest2&suggest.q=e
> {code}
> 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.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to