You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a `time_zone` of `-01:00` is specified, then midnight starts at one hour before midnight UTC:
@@ -207,7 +203,6 @@ GET my-index-000001/_search?size=0
207
203
}
208
204
}
209
205
```
210
-
211
206
% TEST[continued]
212
207
213
208
Now three 1-hour buckets are still returned but the first bucket starts at 11:00pm on 30 September 2015 since that is the local time for the bucket in the specified time zone.
@@ -239,7 +234,6 @@ Now three 1-hour buckets are still returned but the first bucket starts at 11:00
To get the next set of buckets, resend the same aggregation with the `after` parameter set to the `after_key` value returned in the response. For example, this request uses the `after_key` value provided in the previous response:
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/mapping-reference/search-as-you-type.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ PUT my-index-000001/_doc/1?refresh
51
51
52
52
% TEST[continued]
53
53
54
-
The most efficient way of querying to serve a search-as-you-type use case is usually a [`multi_match`](query-dsl-multi-match-query.md) query of type [`bool_prefix`](query-dsl-match-bool-prefix-query.md) that targets the root `search_as_you_type` field and its shingle subfields. This can match the query terms in any order, but will score documents higher if they contain the terms in order in a shingle subfield.
54
+
The most efficient way of querying to serve a search-as-you-type use case is usually a [`multi_match`](/reference/query-languages/query-dsl-multi-match-query.md) query of type [`bool_prefix`](/reference/query-languages/query-dsl-match-bool-prefix-query.md) that targets the root `search_as_you_type` field and its shingle subfields. This can match the query terms in any order, but will score documents higher if they contain the terms in order in a shingle subfield.
To search for documents that strictly match the query terms in order, or to search using other properties of phrase queries, use a [`match_phrase_prefix` query](query-dsl-match-query-phrase-prefix.md) on the root field. A [`match_phrase` query](query-dsl-match-query-phrase.md) can also be used if the last term should be matched exactly, and not as a prefix. Using phrase queries may be less efficient than using the `match_bool_prefix` query.
126
+
To search for documents that strictly match the query terms in order, or to search using other properties of phrase queries, use a [`match_phrase_prefix` query](/reference/query-languages/query-dsl-match-query-phrase-prefix.md) on the root field. A [`match_phrase` query](/reference/query-languages/query-dsl-match-query-phrase.md) can also be used if the last term should be matched exactly, and not as a prefix. Using phrase queries may be less efficient than using the `match_bool_prefix` query.
127
127
128
128
```console
129
129
GET my-index-000001/_search
@@ -155,8 +155,8 @@ More subfields enables more specific queries but increases index size.
155
155
156
156
The following parameters are accepted in a mapping for the `search_as_you_type` field due to its nature as a text-like field, and behave similarly to their behavior when configuring a field of the [`text`](text.md) data type. Unless otherwise noted, these options configure the root fields subfields in the same way.
157
157
158
-
[`analyzer`](analyzer.md)
159
-
: The [analyzer](analysis.md) which should be used for `text` fields, both at index-time and at search-time (unless overridden by the [`search_analyzer`](search-analyzer.md)). Defaults to the default index analyzer, or the [`standard` analyzer](analysis-standard-analyzer.md).
: The [analyzer](docs-content://manage-data/data-store/text-analysis.md) which should be used for `text` fields, both at index-time and at search-time (unless overridden by the [`search_analyzer`](/reference/elasticsearch/mapping-reference/search-analyzer.md)). Defaults to the default index analyzer, or the [`standard` analyzer](/reference/data-analysis/text-analysis/analysis-standard-analyzer.md).
160
160
161
161
[`index`](mapping-index.md)
162
162
: Should the field be searchable? Accepts `true` (default) or `false`.
@@ -185,7 +185,7 @@ The following parameters are accepted in a mapping for the `search_as_you_type`
185
185
186
186
## Optimization of prefix queries [prefix-queries]
187
187
188
-
When making a [`prefix`](query-dsl-prefix-query.md) query to the root field or any of its subfields, the query will be rewritten to a [`term`](query-dsl-term-query.md) query on the `._index_prefix` subfield. This matches more efficiently than is typical of `prefix` queries on text fields, as prefixes up to a certain length of each shingle are indexed directly as terms in the `._index_prefix` subfield.
188
+
When making a [`prefix`](/reference/query-languages/query-dsl-prefix-query.md) query to the root field or any of its subfields, the query will be rewritten to a [`term`](/reference/query-languages/query-dsl-term-query.md) query on the `._index_prefix` subfield. This matches more efficiently than is typical of `prefix` queries on text fields, as prefixes up to a certain length of each shingle are indexed directly as terms in the `._index_prefix` subfield.
189
189
190
190
The analyzer of the `._index_prefix` subfield slightly modifies the shingle-building behavior to also index prefixes of the terms at the end of the field’s value that normally would not be produced as shingles. For example, if the value `quick brown fox` is indexed into a `search_as_you_type` field with `max_shingle_size` of 3, prefixes for `brown fox` and `fox` are also indexed into the `._index_prefix` subfield even though they do not appear as terms in the `._3gram` subfield. This allows for completion of all the terms in the field’s input.
0 commit comments