Hi all,
I am indexing some XML data which describes publications like brochures,
manuals etc.
The XML contains a section perfect for faceting that looks like this:
<search_keywords>
<search_keyword>M2M4-6655ENW</search_keyword>
<search_keyword>folding cartons</search_keyword>
<search_keyword>digital printing</search_keyword>
<search_keyword>high quality</search_keyword>
</search_keywords>
The problem is, however, that the owner of the XML has been appending product
numbers to those keywords creating lots of unique entries in search keywords
(see first node).
To try and get around that I've found they have a consistent node like this one
somewhere else in the doc:
<object_name> M2M4-6655ENW </object_name>
I want to import all <search_keyword> nodes, which do not contain the value
from the <object_name> node, I am trying something like this:
<field column="search_keyword"
xpath="/document/search_keywords/search_keyword[. != /document/object_name]"/>
But Solr seems to get a null array back and none of the fields get
imported...When testing against XPath parsers this expression seems to work. If
I run just <field column="search_keyword"
xpath="/document/search_keywords/search_keyword"/> it works fine and imports
all <search_keyword> nodes.
Thank you,
Radek.
Radoslaw Zajkowski
Senior Developer
O?
proximity
CANADA
t: 416-972-1505 ext.7306
c: 647-281-2567
f: 416-944-7886
2011 ADCC Interactive Agency of the Year
2011 Strategy Magazine Digital Agency of the Year
http://www.proximityworld.com<http://www.proximityworld.com/>
Join us on:
Facebook - http://www.facebook.com/ProximityCanada
Twitter - http://twitter.com/ProximityWW
YouTube - http://www.youtube.com/proximitycanada
Please consider the environment before printing this e-mail.
This message and any attachments contain information, which may be confidential
or privileged. If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information. Please be aware
that such actions are prohibited. If you have received this transmission in
error, kindly notify us by e-mail to
[email protected]<mailto:[email protected]>. We appreciate your cooperation.