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

Explicitly say that "inc" in atomic updates can be negative

    XMLWordPrintableJSON

Details

    Description

      In https://solr.apache.org/guide/8_10/updating-parts-of-documents.html the docs say:

      "inc: Increments a numeric value by a specific amount. Must be specified as a single numeric value."

      I took this to be an analog to Redis's INCRBY, and I inferred from this that the amount could only be a positive integer.  Since there was no DECRBY, I figured that the values could only increase.

      Of course, it turns out that I can decrement the value by passing inc a negative value.  I think it would be good to explictly state that in the docs.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              petdance Andy Lester
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 20m
                  20m