Can I get DIH skip fields that match empty text nodes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Can I get DIH skip fields that match empty text nodes

Alexandre Rafalovitch

I have DIH reading an XML file and getting fields with empty values.
My definition is:
<field column="title" xpath="/database/document/item[@name='Title']/text"/>

/text here is actual node name, not text() (e.g. <item

Right now, I get the field (of type string) with empty value
indexed/stored/returned. Plus, all the copy fields get the empties as

Can I get DIH to skip that field if I don't have any actual text in
it? I can see how to do it with custom transformer, but it seems that
this would be a common problem and I might just be missing a setting
or some XPath secret.

I actually tried [node()],  [text()] and .../text/text() at the end,
but that seems to make the XPathEntityProcessor skip the field all

Personal blog:
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD