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
Remove the ability to index or query context suggestions without context (elastic#31007)
This is a follow up of elastic#30712 that removes the ability to index or query
and context enabled completion field without context.
Relates elastic#30712
"Indexing and Querying without contexts is deprecated":
340
+
"Indexing and Querying without contexts is forbidden":
341
341
- skip:
342
342
version: " - 6.99.99"
343
-
reason: this feature was deprecated in 7.0
344
-
features: "warnings"
343
+
reason: this feature was removed in 7.0
345
344
346
345
- do:
347
346
index:
@@ -359,8 +358,7 @@ setup:
359
358
color: "blue"
360
359
361
360
- do:
362
-
warnings:
363
-
- "The ability to index a suggestion with no context on a context enabled completion field is deprecated and will be removed in the next major release."
361
+
catch: /Contexts are mandatory in context enabled completion field \[suggest_context\]/
364
362
index:
365
363
index: test
366
364
type: test
@@ -373,22 +371,20 @@ setup:
373
371
indices.refresh: {}
374
372
375
373
- do:
376
-
warnings:
377
-
- "The ability to query with no context on a context enabled completion field is deprecated and will be removed in the next major release."
374
+
catch: /Missing mandatory contexts in context query/
378
375
search:
376
+
allow_partial_search_results: false
379
377
body:
380
378
suggest:
381
379
result:
382
380
text: "foo"
383
381
completion:
384
382
field: suggest_context
385
383
386
-
- length: { suggest.result: 1 }
387
-
388
384
- do:
389
-
warnings:
390
-
- "The ability to query with no context on a context enabled completion field is deprecated and will be removed in the next major release."
385
+
catch: /Missing mandatory contexts in context query/
391
386
search:
387
+
allow_partial_search_results: false
392
388
body:
393
389
suggest:
394
390
result:
@@ -397,12 +393,10 @@ setup:
397
393
field: suggest_context
398
394
contexts: {}
399
395
400
-
- length: { suggest.result: 1 }
401
-
402
396
- do:
403
-
warnings:
404
-
- "The ability to query with no context on a context enabled completion field is deprecated and will be removed in the next major release."
397
+
catch: /Missing mandatory contexts in context query/
Copy file name to clipboardExpand all lines: rest-api-spec/src/main/resources/rest-api-spec/test/suggest/40_typed_keys.yml
+1-16Lines changed: 1 addition & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,6 @@ setup:
19
19
"type": "category"
20
20
21
21
- do:
22
-
warnings:
23
-
- "The ability to index a suggestion with no context on a context enabled completion field is deprecated and will be removed in the next major release."
24
22
bulk:
25
23
refresh: true
26
24
index: test
@@ -29,20 +27,12 @@ setup:
29
27
- '{"index": {}}'
30
28
- '{"title": "Elasticsearch in Action", "suggestions": {"input": "ELK in Action", "contexts": {"format": "ebook"}}}'
31
29
- '{"index": {}}'
32
-
- '{"title": "Elasticsearch - The Definitive Guide", "suggestions": {"input": ["Elasticsearch in Action"]}}'
30
+
- '{"title": "Elasticsearch - The Definitive Guide", "suggestions": {"input": ["Elasticsearch in Action"], "contexts": {"format": "ebook"}}}'
33
31
34
32
---
35
33
"Test typed keys parameter for suggesters":
36
-
- skip:
37
-
# version: " - 6.99.99"
38
-
# reason: queying a context suggester with no context was deprecated in 7.0
39
-
version: "all"
40
-
reason: "Awaiting a fix: https://github.com/elastic/elasticsearch/issues/31698"
41
-
features: "warnings"
42
34
43
35
- do:
44
-
warnings:
45
-
- "The ability to query with no context on a context enabled completion field is deprecated and will be removed in the next major release."
0 commit comments