Skip to content

Commit

Permalink
Flat object field should delegate to keyword field for most query types
Browse files Browse the repository at this point in the history
Signed-off-by: kkewwei <[email protected]>
  • Loading branch information
kkewwei committed Sep 24, 2024
1 parent d6bda7d commit c308a98
Show file tree
Hide file tree
Showing 8 changed files with 1,990 additions and 258 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Implement WithFieldName interface in ValuesSourceAggregationBuilder & FieldSortBuilder ([#15916](https://github.com/opensearch-project/OpenSearch/pull/15916))
- Add successfulSearchShardIndices in searchRequestContext ([#15967](https://github.com/opensearch-project/OpenSearch/pull/15967))
- Remove identity-related feature flagged code from the RestController ([#15430](https://github.com/opensearch-project/OpenSearch/pull/15430))
- Flat object field use IndexOrDocValuesQuery to optimize query ([#14383](https://github.com/opensearch-project/OpenSearch/issues/14383))

### Dependencies
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,38 +671,6 @@ teardown:
- match: { error.root_cause.0.reason: "Mapping definition for [data] has unsupported parameters: [analyzer : standard]"}
- match: { status: 400 }

# Wildcard Query with dot path.
- do:
catch: bad_request
search:
body: {
_source: true,
query: {
"wildcard": {
"catalog.title": "Mock*"
}
}
}
- match: { error.root_cause.0.type: "query_shard_exception" }
- match: { error.root_cause.0.reason: "Can only use wildcard queries on keyword and text fields - not on [catalog.title] which is of type [flat_object]"}
- match: { status: 400 }

# Wildcard Query without dot path.
- do:
catch: bad_request
search:
body: {
_source: true,
query: {
"wildcard": {
"catalog": "Mock*"
}
}
}
- match: { error.root_cause.0.type: "query_shard_exception" }
- match: { error.root_cause.0.reason: "Can only use wildcard queries on keyword and text fields - not on [catalog] which is of type [flat_object]" }
- match: { status: 400 }

# Aggregation and Match Query with dot path.
- do:
catch: bad_request
Expand Down
Loading

0 comments on commit c308a98

Please sign in to comment.