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

fl should support regular expressions for retrieval

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Solr currently supports only two syntax for retrieving fields.
      fl = * (Retrieves all stored fields)
      fl = fl1, fl2, fl3, (retrieves stored fields explicitly specified)

      And this is insufficient for many needs. And there are additional features/syntaxes that would be really handy.
      Case 1 : Dynamic fields ( field names are prefixed/suffixed/name-spaced)
      fl=*
      fl.prefix = <prefix>.*
      fl.suffix = *.<suffix>
      or even better
      fl.ftype=<field-type>

      Case 2: Field Names are explicitly namespaced by user
      fl =*
      fl = <regular-expression>

      Implementation wise this can be achieved by firing a LukeRequest handler to resolve the fields .. We have to be carefully see its impact on document cache keys and size but for starters we can just mark the feature an experimental and disable the document cache for wildcard support.
      Similarly there are a lot of cases, where user has explicitly stored huge fields for completeness sake and usually never needs it.
      Currently we have includeOnly syntax in case of fl but something like
      fl.exclude=<field-name|regex-on-field-name> will be immensely useful.

      Attachments

        Issue Links

          Activity

            erickerickson Erick Erickson added a comment -

            This has been on my list forever. It seems like this could be something that's part of this JIRA, a way to say "exclude these fields".
            The use-case here is that you have a few huge fields that you usually don't want returned, so the default is "return all fields except X,Y,Z"
            If you're going to work on this JIRA, please feel free to assign SOLR-3191 to yourself, it'll relieve my guilt over not getting to it for so long.

            erickerickson Erick Erickson added a comment - This has been on my list forever. It seems like this could be something that's part of this JIRA, a way to say "exclude these fields". The use-case here is that you have a few huge fields that you usually don't want returned, so the default is "return all fields except X,Y,Z" If you're going to work on this JIRA, please feel free to assign SOLR-3191 to yourself, it'll relieve my guilt over not getting to it for so long.

            People

              Unassigned Unassigned
              umesh.prasad Umesh Prasad
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: