We have an es index storing some xml data.
With the english analyzer, the angular brackets will be treated as stop words. Searching "value" equals searching "element value".
How can I manage to search with the angular brackets?
Thanks in advance.
We have an es index storing some xml data.
With the english analyzer, the angular brackets will be treated as stop words. Searching "value" equals searching "element value".
How can I manage to search with the angular brackets?
Thanks in advance.
Hey,
have you thought converting this data to JSON, so you can search for single fields?
The xml filter plugin from logstash might be a good choice. You could setup logstash with an elasticsearch input to gather the data, modify it, and then store it back in ES, like a reindexing operation.
If you try to parse and analyze XML manually, you will run into so many corner cases and specialtes, I dont think it will save you any time in the long run.
--Alex
Hi Alex,
Thanks for your suggestion. That would be a solution. But not suitable for our case. Actually, the XML data is a kind of our logs, which need be kept its original format.
Maybe I should ask in another words, that, how to do the full-text search while keeping the angular brackets.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.