You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Describe the bug
Current cast-allocation index contains two string fields that are used for time range query:
data.begin_time
data.history.end_time
With elasticsearch 7.5.1+, time range queries on text fields do not work. These fields need to be mapped to date type.
It's possible that the index cast-allocation didn't have a customized mapping of data fields initially. So, filebeat reads the allocation records in csm_transaction log and puts them into elasticsearch indexes as text or string type.
This defect documents the procedure of loading a customized index mapping template for cast-allocation using the filebeat and curl commands.
To Reproduce
Steps to reproduce the behavior:
Log in to a BDS node to access elasticsearch service (local or remote).
Run curl to display cast-allocation index mapping:
Expected behavior
Those date fields should be defined as date, for example:
"begin_time" : {
"type" : "date"
},
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Machine [CSM BDS, IST BDS clusters]
Version [CSM 1.8.2]
Additional context
With these fields changed to date type, the date format to be written into them needs to have correct format as well. See #992.
Issue Source:
Beside addressing the index mapping issue, the procedure of how to use the filebeat command to load customized mapping template should be in CSM BDS readthedoc for when there's need in the future.
The text was updated successfully, but these errors were encountered:
Following are the steps to load a customized index mapping for cast-allocation using the filebeat command.
/etc/filebeat/filebeat.ym contains following at the end (no changes).
Note: The section under "Elasticsearch template setting" could be added automatically by one of the commands.
Edit cast-allocation-map.json and change the two fields: data.begin_time and data.history.end_time to type date as shown in defect description.
Copy cast-allocation-map.json to cast-allocation-template.json. Edit the new file and make sure the "index_patterns" attribute is assigned the value "cast-allocation" before the "mappings" section.
Login to kibana GUI to delete existing cast-allocation index in elasticsearch and kibana. Then, create some new csm allocations to see new cast-allocation index in Elasticsearch. Now, create the index pattern in kibana to access new data.
Edited the steps to add the last step because it's necessary to delete the old cast-allocation index in elasticsearch and kibana. Then, the new data will be mapped to the new data type.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Current cast-allocation index contains two string fields that are used for time range query:
With elasticsearch 7.5.1+, time range queries on
text
fields do not work. These fields need to be mapped todate
type.It's possible that the index cast-allocation didn't have a customized mapping of data fields initially. So,
filebeat
reads the allocation records incsm_transaction
log and puts them intoelasticsearch
indexes as text or string type.This defect documents the procedure of loading a customized index mapping template for
cast-allocation
using thefilebeat
andcurl
commands.To Reproduce
Steps to reproduce the behavior:
curl
to displaycast-allocation
index mapping:begin_time
andend_time
text
, for example:Expected behavior
Those date fields should be defined as date, for example:
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
With these fields changed to
date
type, the date format to be written into them needs to have correct format as well. See #992.Issue Source:
Beside addressing the index mapping issue, the procedure of how to use the
filebeat
command to load customized mapping template should be in CSM BDS readthedoc for when there's need in the future.The text was updated successfully, but these errors were encountered: