I do have a requirement to create visualizations of all total transactions and transactions that contain "Error" or "Exception" anywhere. The whole message is saved as {"type" : "text"} as per the mapping. Each transaction would contain different data structure so I would not be able to change to {"type : Keyword"} since I read it might cause performance issue (correct me if I'm wrong) and the other solution was to turn on field data which is also not advisable. Is there any other solution, please let me know?
P.S - My transactions are XML, but stored as String right now (using store_xml => false). Can this issue be solved somehow if I store transactions as XML?
Can you show an example of a document, how it looks in ES/Kibana? Type: text is the proper mapping so that shouldn't be a problem. If you search for "Exception" in discover does it show the proper documents?
Unfortunately would not be able to share Kibana screenshot due to organisation policy. And yes, I am able to get the desired results in discover with below query.
> message : *Error* or message : *Exception*
But in Visualizations, "message" field is not available since it is not a keyword, but a text as per mappings.
Would you be able to help with these limited info. please?
The "message" field which we are discussing here, would be big up to 5MB, so setting this multi field wouldn't cause any performance issue?
Since the field would contain many values, is it safe to increase from default ignore_above to values around 100000.
"ignore_above": 256
Below is the snippet of current mapping, I dont see find exactly where it has to be changed to make it as multi-field based on the reference you shared.
I have changed my indexing slightly by trimming few unwanted wrappers in the message and adding it to a new field "payloadString" which is now available for aggregation , but not for most of my documents, since it is ignored due to below parameter.
ignore_above : 256
So is there any other solution to make entire string available for aggregation?
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.