-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot filter, sort, or aggregate on _type
.
#5684
Comments
I have encountered this bug too after upgrading from ES1.7.x ->2.1 and Kibana 4.2 -> 4.3.1 All existing index patterns have _type as indexed.
I tried updating the value using Elasticsearch API to modify .kibana index settings. After reloading kibana web page, this worked. Refreshing field values for an old index where _type was set to indexed, _type stayed as indexed:true. This is looking to be more of an ES bug that is affecting Kibana. Using the _mapping API on an old index returned the following: /oldindex-2014.12.28/_mapping/logs/field/_type?include_defaults=true
On the new index:
Looks like something has changed with ES 2.x. The mapping entity is empty, preventing Kibana from detecting the _type field as indexed. So a workaround is to manually update the .kibana/index-patterns using the Elasticsearch API. |
Guys this is a complete bummer. I commonly use _type. Can we please get a resolution? It seems the fixing of this keeps getting postponed. |
I got a reply on elasticsearch issue i raised: elastic/elasticsearch#16389 (comment) There is a way around this. You need to edit the .kibana data..see my post on this discuss |
👍 Nice! @johncollaros |
It sounds like same issue described in #5634 |
_type
column. _type
.
As noted, this is being caused by a change to the Elasticsearch API that removes the returning of mappings for Elasticsearch metadata fields: elastic/elasticsearch#16389 (comment). I weighed in on that as I don't think its a good idea for us to hard code the abilities of those fields as they may change over time, as they have in the past. I'd prefer the Elasticsearch API informed us of the field's capabilities |
👍 |
What's the point of having types if you can't filter on them? I went to the trouble of working out datatyping and mapping for my documents before indexing several different types of them. Will this be fixed anytime soon in Kibana or do we have to either use the workaround (thanks for it doing it johncollaros) or redesign our our schemas by adding an extra type field? Seems as though the workaround is also problematic as a user could reset Kibana and put it back into the broken state? |
It could be 100% done when sending a request manually, +1 for having a workaround for this feature, |
@johncollaros the method of eidt .kibana workd fine, but when i refresh in kibana (Settings --> Inidces --> refresh button), _type indexed change back to false. I used elasticsearch-2.3.3、kibana-4.5.2, is the kibana bug not fixed yet? |
👍 |
@wusthuke yes, if you ever use the refresh button in kibana it will undo the workaround. I've done a clean install of es 2.3.4 and kibana 4.5.4 and this is still broken. |
Is anything being done to fix this issue in pre 5 releases? |
I could type in the filter manually in the search bar like this |
I think this is the same issue with users trying to filter or aggregate on I documented here how a user could aggregate on I understand the reluctance to hard-code |
Yes I agree. Plus it will always be possible to deduce the capability using the ES cluster version. If it changes, it should not be hard to say, for every version < 5.x.y, then it is indexed, after it is not anymore. I think this should be a blocker for 5.0.0 so we don't get this for the next big release. |
Adding a scripted field
From Discover tab I can add both fields to my document list under the histogram. I can sort on my scripted I can search on I can filter on I get 2 warnings on Discover when I mouse over Visualize on _type; I get 1 warning when I mouse over Visualize on my scripted In a Vertical Bar Chart Terms aggregation I see both Refreshing the index pattern does not remove the scripted field. |
_type
. _type
.
It was already possible to sort, aggregate, and filter on _type in ES but we didn't allow it in Kibana because Elasticsearch's APIs pre-5.0 didn't report mapping information for meta fields. Now that field stats returns searchable and aggregatable (including meta fields) we can safely determine if any field is filterable, sortable, or aggregatable without looking at the mappings. This PR simply includes the searchable and aggregatable information in the calculations that determine filterable and sortable status of a field. Fixes #5684
@Bargs , I using kibana 5.1.2, I can create visualization of _type field, but when I filtering I get "_type field can not be used for filtering" error |
@ytzlax this will be fixed in 5.4 |
There are a few Found customers find that they cannot filter on
_type
.I could reproduce it with a simple clean index. (es 2.1, Kibana 4.3).
I think this might be a bug.
Discuss issue link : https://discuss.elastic.co/t/elasticsearch-2-0-with--type-not-indexed/35244/10
The text was updated successfully, but these errors were encountered: