OpenSearch/rest-api-spec/test/search/60_query_string.yaml

80 lines
1.3 KiB
YAML
Raw Normal View History

---
"search with query_string parameters":
- do:
indices.create:
index: test
body:
mappings:
test:
_all:
enabled: false
properties:
number:
type: integer
- do:
index:
index: test
type: test
id: 1
body: { field: foo bar}
- do:
indices.refresh:
index: [test]
- do:
search:
index: test
q: bar
df: field
- match: {hits.total: 1}
- do:
search:
index: test
q: field:foo field:xyz
- match: {hits.total: 1}
- do:
search:
index: test
q: field:foo field:xyz
default_operator: AND
- match: {hits.total: 0}
- do:
search:
index: test
q: field:bars
analyzer: snowball
- match: {hits.total: 1}
- do:
search:
index: test
q: field:BA*
lowercase_expanded_terms: false
- match: {hits.total: 0}
- do:
search:
index: test
q: field:BA*
analyze_wildcard: true
- match: {hits.total: 1}
- do:
search:
index: test
q: number:foo
lenient: true
- match: {hits.total: 0}