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

AddUpdateCommand.getIndexedId doesn't work with schema configured defaults/copyField - UUIDField/copyField can not be used as uniqueKey field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 4.0-ALPHA
    • 4.0-ALPHA
    • update
    • None

    Description

      in Solr 1.4, and the HEAD of the 3x branch, the UUIDField can be used as the uniqueKey field even if documents do not specify a value by taking advantage of the default="NEW" feature of UUIDField.

      Similarly, a copyField can be used to populate the uniqueKey field with data from some field with another name – multiple copyFields can even be used if there is no overlap (ie: if you have two differnet types of documents with no overlap in their id space, you can copy from companyId->id and from productId->id and use "id" as your uniqueKey field in solr)

      Neither of these approaches work in Solr trunk because of how AddUpdateCommand.getIndexedId is currently used by the DirectUpdateHander2 (see r1152500).

      Attachments

        1. SOLR-2796.patch
          4 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              hossman Chris M. Hostetter
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: