-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't workingv2.12.0Issues and PRs related to version 2.12.0Issues and PRs related to version 2.12.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Description
Describe the bug
I have an index with a field of type “flat_object,” and the JSON object for that field contains dotted sub-field names. I’m attempting to apply a term query using the entire key and value but it doesn't work as expected
To Reproduce
Steps to reproduce the behavior:
- Create an index with mapping:
PUT /my-test-os-index
{
"mappings": {
"properties": {
"transcript": {"type": "flat_object"}
}
}
}
- Index a single document
POST my-test-os-index/_doc
{
"transcript": {
"one": "FAILED",
"two.one": "FAILED",
"three": "FAILED"
}
}
- Run a term query
POST my-test-os-index/_search
{
"query": {
"term": {"transcript.three": "FAILED"}
}
}
- The results are empty
Expected behavior
We expect the one indexed document to be returned cause it matches the criteria
Plugins
I am using OpenSearch 2.9
Host/Environment (please complete the following information):
Using OS serverless
Additional context
POST my-test-os-index/_search
{
"query": {
"term": {"transcript.one": "FAILED"}
}
}
This query retrieves the document making the results order dependent and unreliable
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't workingv2.12.0Issues and PRs related to version 2.12.0Issues and PRs related to version 2.12.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Type
Projects
Status
✅ Done