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

Erick Erickson commented on SOLR-5528:
--------------------------------------

bq: I don't think there is a real use case for multiple suggesters

Here are two:

1> You want to get suggestions from more than one field without bloating your 
index by copying all the fields into a single "suggest" field. Without making 
multiple requests. I've seen this go by on the user's list multiple times.

2> You want to display suggestions from different fields differently, say 
giving more weight to ones from "title". 

As for complexity, I don't see how adding one field to the response that may be 
ignored is adding much in the way of complexity, but then I'm not doing the 
work so....

All the rest is supported OOB, so the use-cases are realizable even now without 
adding the name of the component. Adding the name seems useful though.

> Change New Suggester Response and minor cleanups
> ------------------------------------------------
>
>                 Key: SOLR-5528
>                 URL: https://issues.apache.org/jira/browse/SOLR-5528
>             Project: Solr
>          Issue Type: Improvement
>          Components: SearchComponents - other
>            Reporter: Areek Zillur
>             Fix For: 5.0, 4.7
>
>         Attachments: SOLR-5528.patch
>
>
> It would be nice to have a simplified response format for the new Suggester 
> Component. 
> The proposed format is as follows:
> XML: 
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
>    <lst name="responseHeader">
>       <int name="status">0</int>
>       <int name="QTime">32</int>
>    </lst>
>    <str name="command">build</str>
>    <lst name="suggest">
>       <lst name="ele">
>          <int name="numFound">1</int>
>          <arr name="suggestions">
>             <lst>
>                <str name="term">electronics and computer1</str>
>                <long name="weight">2199</long>
>                <str name="payload" />
>             </lst>
>          </arr>
>       </lst>
>    </lst>
> </response>
> {code}
> JSON:
> {code}
> {
>     "responseHeader": {
>         "status": 0,
>         "QTime": 30
>     },
>     "command": "build",
>     "suggest": {
>         "ele": {
>             "numFound": 1,
>             "suggestions": [
>                 {
>                     "term": "electronics and computer1",
>                     "weight": 2199,
>                     "payload": ""
>                 }
>             ]
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to