Solr
  1. Solr
  2. SOLR-4249

change UniqFieldsUpdateProcessorFactory to subclass FieldValueSubsetUpdateProcessorFactory

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      UniqFieldsUpdateProcessorFactory has been arround for a while, but if we change it to subclass FieldValueSubsetUpdateProcessorFactory, a lot of redundent code could be eliminated from that class, and the factory could be made more configurable by supporting all of the field matching logic in FieldMutatingUpdateProcessorFactory, not just a list of field names.

      (the only new code that would be needed is handling the legacy config case currently supported by UniqFieldsUpdateProcessorFactory)

      For users of 4.x starting with 4.5, the existing init param syntax will still be supported, but a warning will be logged recommending they switch to using <arr name="fieldName">...</arr> instead of <lst name="fields">..</lst>. Starting with 5.0, the "fields" option won't be recognized at all.

        Activity

        Hide
        Hoss Man added a comment -

        A "phase 1" patch that switches UniqFieldsUpdateProcessorFactory to be a subclass of FieldValueSubsetUpdateProcessorFactory with some custom init logic to deal with the previous "fields" config syntax and log a warning that it is deprecated. Includes a new test of the FieldMutatingUpdateProcessor selector syntax, but leaves the other existing tests alone to prove that it still works.

        plan is to commit & backport this, then commit a trunk only change removing the backcompat support for the hackish syntax and upate the test configs accordingly.

        Show
        Hoss Man added a comment - A "phase 1" patch that switches UniqFieldsUpdateProcessorFactory to be a subclass of FieldValueSubsetUpdateProcessorFactory with some custom init logic to deal with the previous "fields" config syntax and log a warning that it is deprecated. Includes a new test of the FieldMutatingUpdateProcessor selector syntax, but leaves the other existing tests alone to prove that it still works. plan is to commit & backport this, then commit a trunk only change removing the backcompat support for the hackish syntax and upate the test configs accordingly.
        Hide
        ASF subversion and git services added a comment -

        Commit 1518717 from hossman@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1518717 ]

        SOLR-4249: UniqFieldsUpdateProcessorFactory now extends FieldMutatingUpdateProcessorFactory and supports all of it's selector options

        Show
        ASF subversion and git services added a comment - Commit 1518717 from hossman@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1518717 ] SOLR-4249 : UniqFieldsUpdateProcessorFactory now extends FieldMutatingUpdateProcessorFactory and supports all of it's selector options
        Hide
        ASF subversion and git services added a comment -

        Commit 1518746 from hossman@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1518746 ]

        SOLR-4249: UniqFieldsUpdateProcessorFactory now extends FieldMutatingUpdateProcessorFactory and supports all of it's selector options (merge r1518717)

        Show
        ASF subversion and git services added a comment - Commit 1518746 from hossman@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1518746 ] SOLR-4249 : UniqFieldsUpdateProcessorFactory now extends FieldMutatingUpdateProcessorFactory and supports all of it's selector options (merge r1518717)
        Hide
        ASF subversion and git services added a comment -

        Commit 1518836 from hossman@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1518836 ]

        SOLR-4249: remove legacy UniqFieldsUpdateProcessorFactory init param syntax from trunk for 5.0

        Show
        ASF subversion and git services added a comment - Commit 1518836 from hossman@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1518836 ] SOLR-4249 : remove legacy UniqFieldsUpdateProcessorFactory init param syntax from trunk for 5.0
        Hide
        Adrien Grand added a comment -

        4.5 release -> bulk close

        Show
        Adrien Grand added a comment - 4.5 release -> bulk close

          People

          • Assignee:
            Hoss Man
            Reporter:
            Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development