Skip to content

Commit 5f5317d

Browse files
committed
[NOCOMMIT] Revert "Flat object field should delegate to keyword field for most query types (opensearch-project#14383)"
This reverts commit 9ddee61. Trying to identify the source of a benchmark regression for big5 keyword-in-range query. Signed-off-by: Michael Froh <[email protected]>
1 parent 6385ad3 commit 5f5317d

File tree

7 files changed

+258
-1989
lines changed

7 files changed

+258
-1989
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/index/90_flat_object.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,38 @@ teardown:
671671
- match: { error.root_cause.0.reason: "Mapping definition for [data] has unsupported parameters: [analyzer : standard]"}
672672
- match: { status: 400 }
673673

674+
# Wildcard Query with dot path.
675+
- do:
676+
catch: bad_request
677+
search:
678+
body: {
679+
_source: true,
680+
query: {
681+
"wildcard": {
682+
"catalog.title": "Mock*"
683+
}
684+
}
685+
}
686+
- match: { error.root_cause.0.type: "query_shard_exception" }
687+
- 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]"}
688+
- match: { status: 400 }
689+
690+
# Wildcard Query without dot path.
691+
- do:
692+
catch: bad_request
693+
search:
694+
body: {
695+
_source: true,
696+
query: {
697+
"wildcard": {
698+
"catalog": "Mock*"
699+
}
700+
}
701+
}
702+
- match: { error.root_cause.0.type: "query_shard_exception" }
703+
- 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]" }
704+
- match: { status: 400 }
705+
674706
# Aggregation and Match Query with dot path.
675707
- do:
676708
catch: bad_request

0 commit comments

Comments
 (0)