Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6.1
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The FVH's FieldQuery throws away some boosts when flattening queries, including DisjunctionMaxQuery and BooleanQuery queries. Fragments generated against queries containing boosted boolean queries don't end up sorted correctly.

        Activity

        Hide
        Nik Everett added a comment -

        Fix the issue by pushing boosts from parent queries to child queries when the parent queries are flattened. I clone the child queries before setting their boost so I don't break anything that expects them unchanged. I'm not super happy that I have to clone the queries but it seemed like the simplest solution.

        Show
        Nik Everett added a comment - Fix the issue by pushing boosts from parent queries to child queries when the parent queries are flattened. I clone the child queries before setting their boost so I don't break anything that expects them unchanged. I'm not super happy that I have to clone the queries but it seemed like the simplest solution.
        Hide
        Adrien Grand added a comment -

        Thanks Nik, your fix looks good! I don't think cloning the queries is an issue, it happens all the time when doing rewrites, and it's definitely better than modifying those queries in-place.

        I'll commit it tomorrow if there is no objection.

        Show
        Adrien Grand added a comment - Thanks Nik, your fix looks good! I don't think cloning the queries is an issue, it happens all the time when doing rewrites, and it's definitely better than modifying those queries in-place. I'll commit it tomorrow if there is no objection.
        Hide
        ASF subversion and git services added a comment -

        Commit 1556483 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1556483 ]

        LUCENE-5361: Fixed handling of query boosts in FastVectorHighlighter.

        Show
        ASF subversion and git services added a comment - Commit 1556483 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1556483 ] LUCENE-5361 : Fixed handling of query boosts in FastVectorHighlighter.
        Hide
        ASF subversion and git services added a comment -

        Commit 1556484 from Adrien Grand in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1556484 ]

        LUCENE-5361: Fixed handling of query boosts in FastVectorHighlighter.

        Show
        ASF subversion and git services added a comment - Commit 1556484 from Adrien Grand in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1556484 ] LUCENE-5361 : Fixed handling of query boosts in FastVectorHighlighter.
        Hide
        ASF subversion and git services added a comment -

        Commit 1556485 from Adrien Grand in branch 'dev/branches/lucene_solr_4_6'
        [ https://svn.apache.org/r1556485 ]

        LUCENE-5361: Fixed handling of query boosts in FastVectorHighlighter.

        Show
        ASF subversion and git services added a comment - Commit 1556485 from Adrien Grand in branch 'dev/branches/lucene_solr_4_6' [ https://svn.apache.org/r1556485 ] LUCENE-5361 : Fixed handling of query boosts in FastVectorHighlighter.
        Hide
        Adrien Grand added a comment -

        While doing a final review, I noticed that you mistakenly modified the boost of the original query instead of the clone. I took the liberty to fix it before committing but please let me know if this looks wrong to you.

        Committed, thanks!

        Show
        Adrien Grand added a comment - While doing a final review, I noticed that you mistakenly modified the boost of the original query instead of the clone. I took the liberty to fix it before committing but please let me know if this looks wrong to you. Committed, thanks!
        Hide
        Nik Everett added a comment -

        Wonderful! Thanks.

        Show
        Nik Everett added a comment - Wonderful! Thanks.

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Nik Everett
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development