Solr
  1. Solr
  2. SOLR-4892

Add field update processors to parse/convert String-typed fields to Date, Number, and Boolean

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, Trunk
    • Component/s: update
    • Labels:
      None

      Description

      Add FieldMutatingUpdateProcessorFactory subclasses ParseFooUpdateProcessorFactory, where Foo includes Date, Double, Long, and Boolean.

      These factories will have a default selector that matches all fields that either don’t match any schema field, or are in the schema with the corresponding typeClass. They can optionally support a list of multiple format specifiers. If they see a value that is not a CharSequence, or can't parse the value using a configured format, they ignore it and leave it as is.

      For multi-valued fields, these processors will not convert any values unless all are first successfully parsed. Ordering the processors [Boolean, Long, Double, Date] will allow e.g. values [2, 5, 8.6] to be left alone by the Boolean and Long processors, but then converted by the Double processor.

      1. SOLR-4892.patch
        102 kB
        Steve Rowe
      2. SOLR-4892.patch
        122 kB
        Steve Rowe
      3. SOLR-4892.patch
        133 kB
        Steve Rowe

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Steve Rowe
              Reporter:
              Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development