I've created data table visualization with terms aggregation and I saw the aggregation isn't working on some values, I think it's connected to the long but not sure.
For example, the following value is aggregatable:
"text": "#auto#error bgs failed to send feedback, however run itself completed"
and the following value is not aggregatable:
"text": "#auto#error \n********\n* Uncaught EXCEPTION. Message: TypeError: r is not a function. (In 'r(function(){},function(){},"CarizmaExtensions","updateZappTokens",[{tokens:t,hotViewName:e}])', 'r' is undefined)\n* Source: https://app.carizma.com/v18/app.7890ab6d49b18fe01a87.js\n* Line:column: [84:28287]\n* Error: {"line":84,"column":28287,"sourceURL":"https://app.carizma.com/v18/app.7890ab6d49b18fe01a87.js\"}\n* Previous log line before exception: CardsService - after putApprovalsFirst there are 0 cards\n********\n",
Sorry, I don't recognise any of those error messages. What software is producing those?
Can you simplify the problem down to an example CURL request and response to elasticsearch directly?
@Mark_Harwood
It's our internal software logs, consider it as a string value of the "text" key.
when I'm creating a data table with term aggregation of the "text" field the value of the second example (the long one) is not aggregatable.
Thanks.
Ah I see. Often there's a limit on field length for aggregatable values. See [1].
Not a logstash expert but I expect 256 is the default limit in an index mapping.
I think it's related to the mapping of the field. keyword\text ???
What is the parallel behavior of "type: string", "index: not_analyzed" on the new ES versions 5.x.x ?
Try testing explicit mapping for both text (type: text) and text.keyword (type: keyword) and see the problem persists with aggregation. These are called Multi-Fields. You set one field with multiple types to allow for different use/search scenarios.
The longer value may not be able to be aggregated due to length, but it would need to be keyword type for aggregation to work.
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.