[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14028475#comment-14028475 ] David Smiley commented on SOLR-5528: I noticed this Suggester isn't documented in the Ref Guide. Also, are there any use-cases addressed by the older Suggester approach that uses the Spellcheck component? 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: 4.7, 5.0 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13851075#comment-13851075 ] ASF subversion and git services commented on SOLR-5528: --- Commit 1551753 from [~rcmuir] in branch 'dev/trunk' [ https://svn.apache.org/r1551753 ] SOLR-5528: improve response format of the new SuggestComponent 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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.4#6159) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13851098#comment-13851098 ] ASF subversion and git services commented on SOLR-5528: --- Commit 1551759 from [~rcmuir] in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1551759 ] SOLR-5528: improve response format of the new SuggestComponent 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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.4#6159) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13851102#comment-13851102 ] Areek Zillur commented on SOLR-5528: Thanks for committing this! 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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.4#6159) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13849364#comment-13849364 ] Robert Muir commented on SOLR-5528: --- Patch looks good Areek. I'll commit later today if there are no objections. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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.4#6159) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841101#comment-13841101 ] Areek Zillur commented on SOLR-5528: NOTE: I mistakenly referred to SOLR-5528 (current jira) instead of the intended SOLR-5529. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13839990#comment-13839990 ] Areek Zillur commented on SOLR-5528: I created and uploaded the patch (SOLR-5528) which will allow users to specify multiple suggesters within a suggesterComponent. It should work in standalone and distributed mode. It was more work than I thought but hopefully it will take care of the use-cases, while letting a single component manage the state. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13840058#comment-13840058 ] Erick Erickson commented on SOLR-5528: -- Areek: That works for me! My suggestions (pun intended) were leveraging off the fact that it just works now, it would be the minimum effort to add in the name. That said, I wasn't really _happy_ with the fact that the name elements had to be the same for the different components or you get a mysterious NPE (str name=namesuggest/str). That indicated that this wasn't thought-out, just happenstance and thus quite possibly fragile. But I can't put the effort into finding out why or fixing in the near future, so I was punting. Your idea is much cleaner and I'll be happy to help work on it...when I can which won't be for some time. Go for it! Erick 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13840524#comment-13840524 ] Areek Zillur commented on SOLR-5528: Hey Erick, just to be clear the patch for the proposal is already ready (SOLR-5528). The only thing is the other patch depends on this patch to be checked in (due to its reliance on the new suggester response format). I will stress again that these changes are only for the NEW suggester component. you can help out by reviewing it :) 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13838861#comment-13838861 ] Erick Erickson commented on SOLR-5528: -- Areek: As luck would have it, a client noticed that you can string two or more suggesters together by listing multiple components in the request handler components section.. I posted a detailed account on the dev list. This allows getting suggestions from multiple fields (or whatever components you define) in separate sections of the response. I'm not that sure whether this is intended behavior or serendipitous. The crux of the matter is that I can see it being useful to return the name of the component in the suggest section, perhaps a sibling to numFound (?) it would help disambiguate the response and might help with distributed processing. But I'm guessing on this last. If we're changing the response format anyway, do you see any harm in putting this added bit in? I hacked a _very_ quick test in by changing toNamedList in SpellCheckComponent, adding getName() to the call, like this: NamedList suggestions = toNamedList(getName(), [all the rest of the parameters just as now]). then adding the string from getName() in to the named list. getName(), of course, is just the bits from {{ arr name=components strname/str strfeatures/str /arr }} i.e. name and features in this example. FWIW, Erick 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13838971#comment-13838971 ] Robert Muir commented on SOLR-5528: --- Erick: Areek isn't referring to spellcheckcomponent here. This is about the new suggestcomponent. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13838998#comment-13838998 ] Robert Muir commented on SOLR-5528: --- I dont think there is a real use case for multiple suggesters Erick. That sounds like a bad way to solve some other problem. I dont think we should complicate the format with this stuff. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13839651#comment-13839651 ] Robert Muir commented on SOLR-5528: --- I'm not sure: it seems like such use cases can be dealt with properly by stuff like LUCENE-5350 ? Remember: this isnt spellcheck. so bloating the index doesnt really exist. Its FSTs. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13839717#comment-13839717 ] Erick Erickson commented on SOLR-5528: -- bq: Remember: this isnt spellcheck. so bloating the index doesnt really exist. Its FSTs. Well, you have to copy all the individual fields into an extra field upon which you build the FST if you do the copy all fields you want to contribute to suggestions into a common field and suggest on _that_ work-around for getting suggestions from multiple fields. About LUCENE-5350. Hmmm, interesting. I'm not entirely sure what the possibilities are there. On a _very_ quick glance it looks like complimentary but not the same cases. But I could very well be mistaken. None of this is new capability, it's all do-able by relying on the position of the returned sections of the suggest parts of the response to be in the same order as the components of the suggest request handler were defined in the present code. It's just about adding one more bit to the suggester response to make it easier to identify which component generated that section, that's all. I don't much like relying on position and the loose coupling between the order of elements in the component chain and the order of the suggest sections in the response. I guess that if we're willing to _guarantee_ that ordering in this and future releases, then the current capabilities will work robustly. 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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
[jira] [Commented] (SOLR-5528) Change New Suggester Response and minor cleanups
[ https://issues.apache.org/jira/browse/SOLR-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13839777#comment-13839777 ] Areek Zillur commented on SOLR-5528: Sorry for the joining so late in the discussion! My thoughts: - I think using several suggest component to solve any use case is not ideal! The same use cases (as mentioned my Erick) can be solved if there was a way to get suggestions from multiple dictionaries at one go. So in order to fulfill these use-cases, I believe we should allow users to 'query' multiple suggesters in one bsingle/b component. Example config: {code} searchComponent class=solr.SuggestComponent name=suggest lst name=suggester str name=namename_suggester/str str name=lookupImplFuzzyLookupFactory/str str name=dictionaryImplDocumentDictionaryFactory/str str name=fieldcat/str str name=weightFieldprice/str str name=storeDirsuggest_fuzzy_doc_dict_payload/str str name=suggestAnalyzerFieldTypetext/str str name=buildOnCommittrue/str /lst lst name=suggester str name=namefeature_suggester/str str name=dictionaryImplDocumentExpressionDictionaryFactory/str str name=lookupImplFuzzyLookupFactory/str str name=fieldcat/str str name=weightExpression((price * 2) + weight)/str str name=sortFieldweight/str str name=sortFieldprice/str str name=storeDirsuggest_fuzzy_doc_expr_dict/str str name=suggestAnalyzerFieldTypetext/str str name=buildOnCommittrue/str /lst /searchComponent {code} And then the user can query as follows: {code} /suggest?suggest.q=blahsuggest.dictionary=name_suggestersuggest.dictionary=feature_suggester {code} In order for the user to distinguish the suggestions, we can change the response format to: {code} { responseHeader: { status: 0, QTime: 30 }, suggest: { name_suggester: { ele: { numFound: 1, suggestions: [ { term: electronics and computer1, weight: 2199, payload: } ] } }, feature_suggester: { ele: { numFound: 1, suggestions: [ { term: electronics and computer1, weight: 2199, payload: } ] } } } } {code} By making sure this is done in the component level (single not multiple), we can also ensure that it will work in all cases that it should (distributed). There is some changes necessary to support the proposed way, besides just the response format. Hence, I believe it should be done in a separate jira (will create and upload the patch soon). I also dont intend to add this to the old suggester (based on spellcheck component) as the component is doing too many things already :). Thoughts? 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=status0/int int name=QTime32/int /lst str name=commandbuild/str lst name=suggest lst name=ele int name=numFound1/int arr name=suggestions lst str name=termelectronics and computer1/str long name=weight2199/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