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

DIH's XPath processor works incorrectly for overlapping XPath paths defined as different fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      Reported by a friend –

      <dataConfig>
      ...
                <field column="Address"           xpath="/records/fullrecord_metadata/addresses/address_name/address_spec/full_address" />
                <field column="AddressALL"     xpath="/records/fullrecord_metadata/addresses flatten="true" />
      ...
      </dataConfig>
      

      This definition doesn't seem to be importing anything in Address field – everything is consumed by AddressALL.

      I looked briefly at the implementation of XPathRecordReader and it seems it's greedy with respect to flattened tree nodes, assuming no other field extracts data from subnodes.

      I think this is a bug (or is it by design)?

      Attachments

        1. SOLR-10012.patch
          7 kB
          Dawid Weiss

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dweiss Dawid Weiss
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: