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

numeric fields need better error handling for prefix/wildcard syntax -- consider uniform support for "foo:* == foo:[* TO *]"



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.0
    • 8.5, 9.0
    • None
    • None


      On the solr-user mailing list, Torsten Krah pointed out that with Trie numeric fields, query syntax such as foo_d:* has been functionality equivilent to foo_d:[* TO *] and asked why this was not also supported for Point based numeric fields.

      The fact that this type of syntax works (for indexed="true" Trie fields) appears to have been an (untested, undocumented) fluke of Trie fields given that they use indexed terms for the (encoded) numeric terms and inherit the default implementation of FieldType.getPrefixQuery which produces a prefix query against the "" (empty string) term.

      (Note that this syntax has aparently never worked for Trie fields with indexed="false" docValues="true" )

      In general, we should assess the behavior users attempt a prefix/wildcard syntax query against numeric fields, as currently the behavior is largely non-sensical: prefix/wildcard syntax frequently match no docs w/o any sort of error, and the aformentioned numeric_field:* behaves inconsistently between points/trie fields and between indexed/docValued trie fields.


        1. SOLR-11746.patch
          52 kB
          Houston Putman
        2. SOLR-11746.patch
          52 kB
          Houston Putman
        3. SOLR-11746.patch
          52 kB
          Houston Putman
        4. SOLR-11746.patch
          52 kB
          Houston Putman
        5. SOLR-11746.patch
          46 kB
          Houston Putman
        6. SOLR-11746.patch
          33 kB
          Houston Putman
        7. SOLR-11746.patch
          32 kB
          Houston Putman
        8. SOLR-11746.patch
          31 kB
          Houston Putman
        9. SOLR-11746.patch
          25 kB
          Houston Putman
        10. SOLR-11746.patch
          8 kB
          Chris M. Hostetter
        11. SOLR-11746.patch
          2 kB
          Kai Chan

        Issue Links



              houston Houston Putman
              hossman Chris M. Hostetter
              3 Vote for this issue
              13 Start watching this issue