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

flatten="false" not working for XPathEntityProcessor

    XMLWordPrintableJSON

Details

    Description

      I would like to get nested entities under the tag dc:contributor
      <dc:contributor>
      <pcz:foreName>John</pcz:foreName>
      <pcz:surName>Doe</pcz:surName>
      </dc:contributor>

      When I use flatten="true", I get contributor="\n\t\tJohn\n\t\tDoe\n " - it's OK (I can replace \n\t with a regex).

      But when I use flatten="false":
      <field column="contributor" xpath="/metadata/contributor" flatten="false" />
      I get contributor="\n\t\t\n\t\t\n " ?! I expect to get xml, both child nodes pcz:foreName, including tag names and tags content.

      1) What I do wrong, is it a bug, do you test flatten="false"?

      2) The page http://wiki.apache.org/solr/DataImportHandler#Configuration_in_data-config.xml-1 says the optional parameter flatten is part of the entity tag, but it must be IMHO part of the field tag.

      Attachments

        Activity

          People

            Unassigned Unassigned
            machj Jan Mach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified