I'm trying to import several RSS feeds using DIH and running into a
bit of a problem. Some feeds define a GUID value that I map to my
Solr ID, while others don't. I also have a link field which I fill in
with the RSS link field. For the feeds that don't have the GUID value
set, I want to use the link field as the id. However, if I define the
same XPath twice, but map it to two diff. columns I don't get the id
value set.
For instance, I want to do:
schema.xml
<field name="id" type="string" indexed="true" stored="true"
required="true"/>
<field name="link" type="string" indexed="true" stored="false"/>
DIH config:
<field column="id" xpath="/rss/channel/item/link" />
<field column="link" xpath="/rss/channel/item/link" />
Because I am consolidating multiple fields, I'm not able to do
copyFields, unless of course, I wanted to implement conditional copy
fields (only copy if the field is not defined) which I would rather not.
How do I solve this?
Thanks,
Grant