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

Field names beginning with numbers give different and incorrect results depending on placement in URL query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7.2
    • Fix Version/s: 4.9
    • Component/s: documentation
    • Environment:

      CentOS 6+

      Description

      I've looked all over for specific field name requirements and can't find any official documentation. Is there official documentation on field names? If not, please provide some!

      We created several field names that begin with numbers, but SOLR doesn't seem to handle that well. Here are two "identical" URL queries that produce different output:

      http://<our_server>:8080/solr/query?q=chr:19%20AND%20pos:16666101&fl=chr,pos,ref,alt,1000G_freq,AFR_freq,ASN_freq

      and

      http://<our_server>:8080/solr/query?q=chr:19%20AND%20pos:16666101&fl=chr,pos,ref,alt,AFR_freq,ASN_freq,1000G_freq

      The only difference between the two queries is the location of '1000G_freq' (middle vs. end). The first query does not return the 1000G_freq value but the second does. Additionally, both return a value that does not exist ("1000":1000). Seems to be doing something funky with the 1000 in the field name. The "1000":1000 disappears if I remove '1000G_freq' from the query.

      Here are the outputs from both queries:

      Query 1 Results

      Query 1 Results
      {
        "responseHeader":{
          "status":0,
          "QTime":1,
          "params":{
            "fl":"chr,pos,ref,alt,1000G_freq,AFR_freq,ASN_freq",
            "q":"chr:19 AND pos:16666101"}},
        "response":{"numFound":5,"start":0,"docs":[
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "AFR_freq":0.05,
              "ASN_freq":0.55,
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "AFR_freq":0.05,
              "ASN_freq":0.55,
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000}]
        }}
      

      Query 2 Results

      Query 2 Results
      {
        "responseHeader":{
          "status":0,
          "QTime":0,
          "params":{
            "fl":"chr,pos,ref,alt,AFR_freq,ASN_freq,1000G_freq",
            "q":"chr:19 AND pos:16666101"}},
        "response":{"numFound":5,"start":0,"docs":[
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000G_freq":0.43,
              "AFR_freq":0.05,
              "ASN_freq":0.55,
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000G_freq":0.43,
              "AFR_freq":0.05,
              "ASN_freq":0.55,
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000},
            {
              "chr":"19",
              "pos":16666101,
              "ref":"G",
              "alt":"C",
              "1000":1000}]
        }}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elyograg Shawn Heisey
                Reporter:
                mebbert Mark Ebbert
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: