I believe DIH completely ignores names places/prefixes. Try skipping those
and just use local
names.
On 10 Dec 2012 20:48, zhk011 zhk...@hotmail.com wrote:
Hi there,
I'm new to Solr and DIH, recently I've been planning to use Solr/DIH to
index some local xml files. Following the DIH example page on solr wiki,
most things work fine, but I found that xml attributes with prefix cannot
be
parse. take the following xml file to be indexed for instance:
---
book xmlns:bk='urn:samples' bk:genre='novel' self='test1'
idtest/id
title Pride And Prejudice/title
/book
---
The data-config.xml is like:
---
field column=tsip.action xpath=/book/@xmlns:bk/
field column=tsip.cc xpath=/book/@bk:genre/
field column=tsip.se xpath=/book/@self/
field column=tsip.ki xpath=/book/id/
---
And all the columns have corresponding field definitions in schema.xml.
But in the index result, only the following fields contain value.
---
doc
str name=tsip.setest/str
str name=tsip.kitest/str
date name=timestamp2012-12-11T09:26:42.716Z/date
/doc
---
Which means I cannot get the value for attributes with prefixes:
tsip.action
and tsip.cc.
What configuration do I need to let DIH parse these attributes with prefix?
Thanks.
--
View this message in context:
http://lucene.472066.n3.nabble.com/How-to-parse-XML-attributes-with-prefix-using-DIH-tp4025888.html
Sent from the Solr - User mailing list archive at Nabble.com.