Analyzer for XML


(srrin) #1

Hi all,
Is there any analyzer available for indexing XML data.
For e.g. If I index a XML data, I need to eliminate the tags and I need to search using the keyword Tove. Jani/ Reminder and retrieve this document for the below XML.

<?xml version="1.0"?> Tove Jani Reminder Don't forget me this weekend!

Thanks
SrrIN


(Shay Banon) #2

None currently (and its a question of what to make sortable in this case, are elements name sortable or not?). It might actually make sense to convert the XML to a json document so you can do more interesting search, but, in both cases, you need to parse the XML and provide it yourself.
On Friday, February 18, 2011 at 12:59 PM, srrIN wrote:

Hi all,
Is there any analyzer available for indexing XML data.
For e.g. If I index a XML data, I need to eliminate the tags and I need to
search using the keyword Tove. Jani/ Reminder and retrieve this document for
the below XML.

<?xml version="1.0"?> Tove Jani Reminder Don't forget me this weekend!

Thanks
SrrIN

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Analyzer-for-XML-tp2525867p2525867.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(srrin) #3

Hi Shay,
Thanks for the reply.

No the element names are not sortable. I need the values to be searchable.


(Mahendra M) #4

On Sun, Feb 20, 2011 at 6:43 AM, Shay Banon shay.banon@elasticsearch.comwrote:

None currently (and its a question of what to make sortable in this case,
are elements name sortable or not?). It might actually make sense to convert
the XML to a json document so you can do more interesting search, but, in
both cases, you need to parse the XML and provide it yourself.

Note: I have not tried it myself, but this might help in converting xml to
json.

--
Mahendra

http://twitter.com/mahendra


(system) #5