Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 3.x
Describe the issue :
If the filter is applied using a scripted field and if any comparison is done against 0 then the whole script is shown in the filter bar. Other than 0 it is shown properly
This was not happening in 2.x
Please find the screenshots attached.
Relevant Logs or Screenshots :
sample data of flights and hour_of_day is the scripted field in the index
For the value 0:
For value other than 0:
Please let us know if this is a bug or is it working correctly.
Thanks in advance
pablo
May 6, 2026, 12:29pm
2
@tejashu Did you test this with latest 3.6.0 version? Also which 2.x version are you referring to?
I tested with 3.5.0
Referring to 2.11 in 2.x version
Is it resolved in 3.6.0?
pablo
May 7, 2026, 12:52pm
4
@tejashu I did some testing with different 2.x and 3.x versions. The issue appeared in 2.16.0 and is still in the latest 3.6.0. As you’ve reported the scripted field filtering only with value 0 is causing that.
I would suggest opening a GitHub issue in the OpenSearch Dashboards repo. If you do so, please share the link here.
opened 01:53PM - 14 May 26 UTC
bug
untriaged
**Describe the bug**
f the filter is applied using a scripted field and if any c… omparison is done against 0 then the whole script is shown in the filter bar. Other than 0 it is shown properly
This was not happening in 2.x
Please find the screenshots attached.
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to a dashboard with the any type of scripted field present
2. Click on 'apply filter
3. Use the scripted field and compare with is /is not to a value 0
4. See the whole scripted field in the filter query bar
**Expected behavior**
scipted field name should come instead of the contenet sof the scripted field
**OpenSearch Version**
Above 2.16.0 until the latest 3.6.0
**Dashboards Version**
Above 2.16.0 until latest 3.6.0
**Plugins**
Please list all plugins currently enabled.
**Screenshots**
Error version:
<img width="610" height="267" alt="Image" src="https://github.com/user-attachments/assets/abaacf7b-8c4b-4f9e-a05d-b683f7093cdd" />
<img width="1260" height="311" alt="Image" src="https://github.com/user-attachments/assets/cf7ab3e6-100b-4242-af8c-87225f22b270" />
Working version: 2.11.0
<img width="605" height="262" alt="Image" src="https://github.com/user-attachments/assets/52b5dea2-5570-4375-b8b8-b20468a34747" />
<img width="596" height="173" alt="Image" src="https://github.com/user-attachments/assets/df4b1b43-714c-43a0-b898-2bf0d6f8efc1" />
**Host/Environment (please complete the following information):**
- OS: 3.2.0
-Any browser
**Additional context**
Link to the raised in Forum
https://forum.opensearch.org/t/scripted-field-when-added-as-filter-for-value-0-shows-the-full-script/28051
Raised the issue in GitHub!