We noticed that only keyword and date field are sort-able in "Discover" , not string and numeric field. I found a post that mentioned we need to use .keyword field in order to make it sortable, to enable it, we need to disable the "Hide missing fields" in the "Available fields" setting. But something which is strange, the .keyword field has missing values. We have an alias field pointing to the .keyword field too, that field also has missing value. When I added the .keyword field and the alias field to clumn, I see an warning message "Unable to write index pattern. Refresh the page to getthe most up to date changes for the index pattern"
Would be great if I can get some recommendation from someone.
Based on having to disable "hide missing fields", I'd say that it's expected that these fields wouldn't contain any data. To me the question is: why are these fields empty? If you query this index directly in the Kibana Console, do you see data in those keyword fields?
What does your index mapping look like for the underlying indices? Can you provide a copy of that?
When I added the .keyword field and the alias field to clumn, I see an warning message "Unable to write index pattern. Refresh the page to getthe most up to date changes for the index pattern"
We've seen this in the past when concurrent updates to the index pattern take too long to save. To triage that further, it would be great to capture a HAR showing this. If you're comfortable doing so, instructions for generating a HAR can be found here: Kibana HAR Instructions · GitHub
Please see the post post, according to @Bargs (Elastic Team memeber), it is common behavior that unchecking "Hide missing field" is a common behavior to see the "keyword" field in Discover. And also it seems like there is bug in alias too, the issue has been raised since august 2018, but until now the error still hasn't been fixed.
Here you can see the field mapping for the activity_type, activity_type.keyword, and the alias Activity_Type. I tried to filter in the activity_type.keyword, and also filter with alias Activity_Type. Both return correct result, but same problem also, the .keyword and alias column have empty value again.
Pic: filter with activity_type.keyword field, return correct result on the activity_type text field
More importantly, it looks like we've made some progress on this front recently. I still don't know when this will be fully resolved, but I linked back to this post as another data point for the team to consider, and asked for an update on the issue.
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.