OpenSearch/rest-api-spec/test/count/20_query_string.yaml

80 lines
1.2 KiB
YAML

---
"count 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:
count:
index: test
q: bar
df: field
- match: {count : 1}
- do:
count:
index: test
q: field:foo field:xyz
- match: {count : 1}
- do:
count:
index: test
q: field:foo field:xyz
default_operator: AND
- match: {count : 0}
- do:
count:
index: test
q: field:bars
analyzer: snowball
- match: {count : 1}
- do:
count:
index: test
q: field:BA*
lowercase_expanded_terms: false
- match: {count : 0}
- do:
count:
index: test
q: field:BA*
analyze_wildcard: true
- match: {count : 1}
- do:
count:
index: test
q: number:foo
lenient: true
- match: {count : 0}