Solr
  1. Solr
  2. SOLR-3243

eDismax and non-fielded range query

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1, 3.2, 3.3, 3.4, 3.5
    • Fix Version/s: 4.9, 5.0
    • Component/s: query parsers
    • Labels:
      None

      Description

      Reported by Bill Bell in SOLR-3085:

      If you enter a non-fielded open-ended range in the search box, like [* TO *], eDismax will expand it to all fields:

      +DisjunctionMaxQuery((content:[* TO *]^2.0 | id:[* TO *]^50.0 | author:[* TO *]^15.0 | meta:[* TO *]^10.0 | name:[* TO *]^20.0))
      

      This does not make sense, and a side effect is that range queries for strings are very expensive, open-ended even more, and you can totally crash the search server by hammering something like ([* TO *] OR [* TO *] OR [* TO *]) a few times...

      1. SOLR-3243.patch
        0.8 kB
        Jan Høydahl

        Issue Links

          Activity

          Jan Høydahl created issue -
          Jan Høydahl made changes -
          Field Original Value New Value
          Component/s query parsers [ 12317802 ]
          Component/s search [ 12310674 ]
          Hide
          Bill Bell added a comment -

          If production sites are using edismax this seems like a very critical issue.

          Show
          Bill Bell added a comment - If production sites are using edismax this seems like a very critical issue.
          Hide
          Bill Bell added a comment -

          If production sites are using edismax this seems like a very critical issue.

          Show
          Bill Bell added a comment - If production sites are using edismax this seems like a very critical issue.
          Hide
          Hoss Man added a comment -

          Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19.

          Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited

          Show
          Hoss Man added a comment - Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19. Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited
          Hoss Man made changes -
          Fix Version/s 3.6 [ 12319065 ]
          Hide
          Hoss Man added a comment -

          bulk fixing the version info for 4.0-ALPHA and 4.0 all affected issues have "hoss20120711-bulk-40-change" in comment

          Show
          Hoss Man added a comment - bulk fixing the version info for 4.0-ALPHA and 4.0 all affected issues have "hoss20120711-bulk-40-change" in comment
          Hoss Man made changes -
          Fix Version/s 4.0 [ 12322455 ]
          Fix Version/s 4.0-ALPHA [ 12314992 ]
          Hide
          Robert Muir added a comment -

          rmuir20120906-bulk-40-change

          Show
          Robert Muir added a comment - rmuir20120906-bulk-40-change
          Robert Muir made changes -
          Fix Version/s 4.0 [ 12322551 ]
          Fix Version/s 4.0-BETA [ 12322455 ]
          Hide
          Hoss Man added a comment -

          removing fixVersion=4.0 since there is no evidence that anyone is currently working on this issue. (this can certainly be revisited if volunteers step forward)

          Show
          Hoss Man added a comment - removing fixVersion=4.0 since there is no evidence that anyone is currently working on this issue. (this can certainly be revisited if volunteers step forward)
          Hoss Man made changes -
          Fix Version/s 4.0 [ 12322551 ]
          Hide
          Jan Høydahl added a comment -

          First attempt for patch. This detects a range query without a field, and generates plain literal field queries for the tokens.

          Show
          Jan Høydahl added a comment - First attempt for patch. This detects a range query without a field, and generates plain literal field queries for the tokens.
          Jan Høydahl made changes -
          Attachment SOLR-3243.patch [ 12544447 ]
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Jan Høydahl made changes -
          Fix Version/s 5.0 [ 12321664 ]
          Hide
          Jan Høydahl added a comment -

          Bill Bell, would you care to test this and comment.

          I think there is still a loophole for a bare * query - it gets expanded across all fields as well and is less efficient than a MatchAllDocsQuery, which is more likely to be the intent when issuing a *. Perhaps we can incorporate that in this issue as well?

          Show
          Jan Høydahl added a comment - Bill Bell, would you care to test this and comment. I think there is still a loophole for a bare * query - it gets expanded across all fields as well and is less efficient than a MatchAllDocsQuery, which is more likely to be the intent when issuing a *. Perhaps we can incorporate that in this issue as well?
          Hide
          Jan Høydahl added a comment -

          Bill Bell, have you tested the patch? What do you think about doing the same for a plain "*"?

          Show
          Jan Høydahl added a comment - Bill Bell , have you tested the patch? What do you think about doing the same for a plain "*"?
          Jan Høydahl made changes -
          Fix Version/s 4.2 [ 12323893 ]
          Jan Høydahl made changes -
          Link This issue is related too SOLR-2996 [ SOLR-2996 ]
          Hide
          Jan Høydahl added a comment - - edited

          Perhaps the pure q=* case should be hanlded more generically by this other issue SOLR-2996

          Show
          Jan Høydahl added a comment - - edited Perhaps the pure q=* case should be hanlded more generically by this other issue SOLR-2996
          Hide
          Jan Høydahl added a comment -

          Have anyone else tested the attached patch? Should we aim to get it in for 4.2? Needs some unit tests..

          Show
          Jan Høydahl added a comment - Have anyone else tested the attached patch? Should we aim to get it in for 4.2? Needs some unit tests..
          Robert Muir made changes -
          Fix Version/s 4.3 [ 12324128 ]
          Fix Version/s 5.0 [ 12321664 ]
          Fix Version/s 4.2 [ 12323893 ]
          Gavin made changes -
          Link This issue is related to SOLR-2996 [ SOLR-2996 ]
          Gavin made changes -
          Link This issue is related to SOLR-2996 [ SOLR-2996 ]
          Uwe Schindler made changes -
          Fix Version/s 4.4 [ 12324324 ]
          Fix Version/s 4.3 [ 12324128 ]
          Hide
          Naomi Dushay added a comment -

          should this be linked to SOLR-2368 ?

          Show
          Naomi Dushay added a comment - should this be linked to SOLR-2368 ?
          Jan Høydahl made changes -
          Link This issue relates to SOLR-2368 [ SOLR-2368 ]
          Hide
          Jan Høydahl added a comment -

          I'm leaving for 3 weeks holiday. If anyone wants to give this a stab for 4.4, welcome to pick it up...

          Show
          Jan Høydahl added a comment - I'm leaving for 3 weeks holiday. If anyone wants to give this a stab for 4.4, welcome to pick it up...
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Hide
          Steve Rowe added a comment -

          Bulk move 4.4 issues to 4.5 and 5.0

          Show
          Steve Rowe added a comment - Bulk move 4.4 issues to 4.5 and 5.0
          Steve Rowe made changes -
          Fix Version/s 5.0 [ 12321664 ]
          Fix Version/s 4.5 [ 12324743 ]
          Fix Version/s 4.4 [ 12324324 ]
          Adrien Grand made changes -
          Fix Version/s 4.6 [ 12325000 ]
          Fix Version/s 5.0 [ 12321664 ]
          Fix Version/s 4.5 [ 12324743 ]
          Uwe Schindler made changes -
          Fix Version/s 4.7 [ 12325573 ]
          Fix Version/s 4.6 [ 12325000 ]
          David Smiley made changes -
          Fix Version/s 4.8 [ 12326254 ]
          Fix Version/s 4.7 [ 12325573 ]
          Hide
          Uwe Schindler added a comment -

          Move issue to Solr 4.9.

          Show
          Uwe Schindler added a comment - Move issue to Solr 4.9.
          Uwe Schindler made changes -
          Fix Version/s 4.9 [ 12326731 ]
          Fix Version/s 5.0 [ 12321664 ]
          Fix Version/s 4.8 [ 12326254 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jan Høydahl
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development