[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838992#comment-13838992 ]
Erick Erickson commented on SOLR-5528: -------------------------------------- Robert: I think it's the same consideration though. The new suggester subclasses SearchComponent. You can define multiple SearchComponents in a requestHandler "components" section and they'd be added to the response as separate sections. So adding the name to the section added by each component would help identify where it came from and you wouldn't have to rely on order and "meta knowledge" of the order defined in solrconfig.xml. I suspect processing distributed suggestions would be more robust too, but that's just a SWAG. I'm not insisting on this mind you, but I was just looking at this and it seems like there's no downside and potential upside so I wanted to suggest it. The fact that I put my code in SpellCheckComponent was just illustrative. Although it could go there too if it's not a back-compat issue I suppose. > 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