Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6318

QParser for TermsFilter

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10
    • query parsers
    • None

    Description

      Some applications require filtering documents by a large number of terms. It's often related to security filtering. Naively this is done this way:

          fq={!df=myfield q.op=OR}code1 code2 code3 code4 code5...
      

      And this ends up being a BooleanQuery. Users then wind up hitting BooleaQuery.maxClauseCount (sometimes in production, sadly) and they up it to a huge number to get the job done.

      Solr should offer a QParser based on TermsFilter. I propose it be named "terms" (plural of term), and have a "separator" option defaulting to a space. When it's a space, the values also get trimmed, which wouldn't otherwise happen. The analysis logic should be the same as that for "term" QParser which is to call FieldType.readableToIndexed.

      Attachments

        1. SOLR-6318__terms_QParser.patch
          9 kB
          David Smiley

        Activity

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: