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

Atomic update on boolean fields doesn't reflect when value starts with "1", "t" or "T"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.11
    • 9.4
    • None
    • None

    Description

      I am running Solr 8.11. As per the Solr documentation, any value starting with "1","t" or "T" for a boolean field is interpreted as true.
       https://solr.apache.org/guide/8_11/field-types-included-with-solr.html#recommended-field-types
       
      However, I hit a potential Solr bug where if the String value  "1","t" or "T"  is passed in an atomic update, it is treated as false.
       
      //Eg:Below document is indexed first => query returns "inStock" as true (as expected) 

      { "id":"test", "inStock":"true" }

       
      //Follow above update with below atomic update and commit. => inStock becomes false in query result

      { "id":"test", "inStock":\{"set":"1"}

      }
       
      This doesn't happen though if value "1" is passed in a regular update.
      Eg:Below update reflects the value of inStock as true when queried.

      { "id":"test", "inStock":"1" }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rahul196452@gmail.com Rahul Goswami
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h