OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

[BUG] Overriding field type in index pattern not working as it should

Open sandervandegeijn opened this issue 1 year ago • 10 comments

Describe the bug

We changed the mapping from string to date for a field on the opensearch side. This is picked up by dashboards, but in the drop down I can't select the date type:

image image

I don't why URL is there, but date is missing.

Expected behavior URL is gone, date is added alongside the string option

OpenSearch Version 2.14.0

Dashboards Version 2.14.0

Plugins

Default docker image

Screenshots

^^

Host/Environment (please complete the following information): ^^

Additional context

Add any other context about the problem here.

sandervandegeijn avatar Jun 21 '24 14:06 sandervandegeijn

@sandervandegeijn Could you refresh the index pattern? index pattern is not auto refreshed based on the indices. and recheck the issue?

ananzh avatar Jun 25 '24 17:06 ananzh

Refreshed the index pattern, it correctly identifies both string and date fields in the different indices. But in the dropdown I can't choose the date option, only the URL option. Where that is coming from: no idea :)

sandervandegeijn avatar Jun 25 '24 17:06 sandervandegeijn

needs more info label can be removed? :)

sandervandegeijn avatar Jul 02 '24 19:07 sandervandegeijn

@sandervandegeijn I see that the index pattern mentions jat there is a conflict in the type. Do all the indices selected by the pattern have the same date type?

ashwin-pc avatar Jul 15 '24 16:07 ashwin-pc

No they don't :) I had indices with text mapping and with date (and it detected that). But the drop down gives URL as an option, which isn't the correct one in any case.

sandervandegeijn avatar Jul 15 '24 21:07 sandervandegeijn

Was this bug always there or is it a regression in 2.14?

ashwin-pc avatar Aug 19 '24 17:08 ashwin-pc

No clue sorry :)

sandervandegeijn avatar Aug 19 '24 17:08 sandervandegeijn

We display the overrides based on mapping in opensearch. If the mappings are not explicitly defined at the time of indexing it tries guessing the mapping which might not be accurate. If you want accurate typing mapping you can specify the mapping while creating the index or create an index template that could help in this scenario.

LDrago27 avatar Aug 20 '24 00:08 LDrago27

@opensearch-project/admin transfer it to opensearch (since we are just reading the mapping off opensearch )

LDrago27 avatar Aug 20 '24 00:08 LDrago27

[Catch All Triage - 1, 2, 3, 4, 5]

dblock avatar Aug 26 '24 16:08 dblock