Solr
  1. Solr
  2. SOLR-2902

List of collations are wrong parsed in SpellCheckResponse

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: clients - java
    • Labels:
      None
    • Environment:

      windows xp.

      Description

      When I do a search query which spellcheck=on I get more then one collation in the solr response:

      <str name="collation">kaart</str>
      <str name="collation">maart</str>
      <str name="collation">vaart</str>
      <str name="collation">staart</str>
      <str name="collation">baart</str>
      <str name="collation">komkaart</str>
      <str name="collation">dagvaart</str>

      The SpellCheckResponse gives me only the collation 'dagvaart':

      getCollatedResults() gives a list of 7 items that contains only Collation objects with 'dagvaart'.
      getCollatedResult() gives a string with the value 'dagvaart'.

      1. SOLR-2902.patch
        4 kB
        James Dyer
      2. SpellCheckResponse.java.patch
        0.6 kB
        Bastiaan Verhoef

        Activity

        Hide
        Uwe Schindler added a comment -

        Bulk close after 3.5 is released

        Show
        Uwe Schindler added a comment - Bulk close after 3.5 is released
        Hide
        Simon Willnauer added a comment -

        committed to trunk and 3.x. I also added a changes.txt entry. thank you Bastiaan & James

        Show
        Simon Willnauer added a comment - committed to trunk and 3.x. I also added a changes.txt entry. thank you Bastiaan & James
        Hide
        Simon Willnauer added a comment -

        Here is an updated patch with a unit test.

        looks good - I will take it

        Show
        Simon Willnauer added a comment - Here is an updated patch with a unit test. looks good - I will take it
        Hide
        James Dyer added a comment -

        Here is an updated patch with a unit test.

        Show
        James Dyer added a comment - Here is an updated patch with a unit test.
        Hide
        Simon Willnauer added a comment -

        nice catch guys... would you be able to provide a testcase for this too?

        Show
        Simon Willnauer added a comment - nice catch guys... would you be able to provide a testcase for this too?
        Hide
        James Dyer added a comment -

        This same bug was previously mentioned on the User List.

        See thread: http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-td3358391.html

        Thank you Bastiaan for opening this issue and providing a patch. Your fix is indeed correct. In case you haven't noticed, you can work around this issue for now by specifying spellcheck.collateExtendedResults=true, as the separate branch in SpellCheckResponse for extended results does not have the bug. While I hope a committer will take this one up sometime soon for both 4.x and 3.x, I wouldn't classify this as "Major" in priority as there is a good workaround.

        Show
        James Dyer added a comment - This same bug was previously mentioned on the User List. See thread: http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-td3358391.html Thank you Bastiaan for opening this issue and providing a patch. Your fix is indeed correct. In case you haven't noticed, you can work around this issue for now by specifying spellcheck.collateExtendedResults=true, as the separate branch in SpellCheckResponse for extended results does not have the bug. While I hope a committer will take this one up sometime soon for both 4.x and 3.x, I wouldn't classify this as "Major" in priority as there is a good workaround.
        Hide
        Bastiaan Verhoef added a comment -

        setCollationQueryString((String) sugg.getVal));

        should become setCollationQueryString((String) o));

        Show
        Bastiaan Verhoef added a comment - setCollationQueryString((String) sugg.getVal )); should become setCollationQueryString((String) o ));

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Bastiaan Verhoef
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development