Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Won't Fix
-
4.6
-
None
-
None
Description
There is a strange behavior, when I use in XPathEntityProcessor, in xpath for multiple fields, rules with attributes for the same tag or when I would like to select the same tag in xpath twice.
My XML looks like:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<id>1</id>
<fileProperties fileType="a">a.pdf</fileProperties>
<fileProperties fileType="b">b.pdf</fileProperties>
<fileProperties fileType="c">c.pdf</fileProperties>
</metadata>
What works fine:
<field column="test_value" xpath="/metadata/fileProperties" multiValued="true" />
<field column="test_fileType" xpath="/metadata/fileProperties/@fileType" multiValued="true" />
The result:
test_value="a.pdf","b.pdf","c.pdf" (correct)
test_fileType="a","b","c" (correct)
What is wrong 1):
When I add a new column (test_fileID) with selecting with an attribute, test_value and test_fileType have wrong values.
<field column="test_fileID" xpath="/metadata/fileProperties[@fileType='a']/@fileType" />
<field column="test_value" xpath="/metadata/fileProperties" />
<field column="test_fileType" xpath="/metadata/fileProperties/@fileType" />
The result:
test_fileID="a" (correct)
test_value="b.pdf","c.pdf" (missing "a.pdf")
test_fileType="b","c" (missing "a")
What is wrong 2):
I cannot select the same field value twice.
<field column="test_one" xpath="/metadata/fileProperties" multiValued="true"/>
<field column="test_two" xpath="/metadata/fileProperties]" multiValued="true"/>
The result:
test_one: (the field is missing, should be "a.pdf","b.pdf","c.pdf")
test_two: "a.pdf","b.pdf","c.pdf" (correct)
Attachments
Issue Links
- is superceded by
-
SOLR-14783 Remove DIH from 9.0
- Closed
- relates to
-
SOLR-4875 DIH XPathRecordReader cannot handle two ways to read same attribute together
- Resolved