-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate reference to _type in lookup queries #37016
Merged
jtibshirani
merged 16 commits into
elastic:master
from
mayya-sharipova:deprecate-reference-to_type-aggregations-retrieving-fields
Jan 9, 2019
Merged
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8e892f5
Deprecate reference to _type in lookup queries
mayya-sharipova d7b0cd8
Some additional refactors and bug fixes.
jtibshirani 986930e
Add Javadoc to deprecated methods to suggest alternatives.
jtibshirani 96370d7
Switch back to using an ids query in RandomQueryBuilder.
jtibshirani 932e250
Avoid introducing a special case in TermsLookup#hashCode.
jtibshirani 6678b83
Add some clarifying comments.
jtibshirani e176101
Prefer to use Strings.EMPTY_ARRAY.
jtibshirani 7a6100a
Give a clear error message when typeless terms lookup queries are use…
jtibshirani 12f5eaf
Minor spacing issue.
jtibshirani f3031ba
Test terms lookup serialization to 6.x nodes.
jtibshirani c9f48a3
Make sure GeoShapeQueryBuilderTests covers typeless queries.
jtibshirani 806e957
Simplify the handling around null types for more_like_this queries.
jtibshirani 8324f5f
Merge remote-tracking branch 'upstream/master' into deprecate-types-i…
jtibshirani 13c4854
Small refactors in response to review comments.
jtibshirani 0bdbd71
Fix an outdated message in GeoShapeQueryBuilderTests.
jtibshirani 61ad78d
Merge remote-tracking branch 'upstream/master' into deprecate-types-i…
jtibshirani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
rest-api-spec/src/main/resources/rest-api-spec/test/search/171_terms_query_with_types.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
"Terms Query with No.of terms exceeding index.max_terms_count should FAIL": | ||
- skip: | ||
version: " - 6.99.99" | ||
reason: index.max_terms_count setting has been added in 7.0.0 | ||
- do: | ||
indices.create: | ||
index: test_index | ||
body: | ||
settings: | ||
number_of_shards: 1 | ||
index.max_terms_count: 2 | ||
mappings: | ||
test_type: | ||
properties: | ||
user: | ||
type: keyword | ||
followers: | ||
type: keyword | ||
- do: | ||
bulk: | ||
refresh: true | ||
body: | ||
- '{"index": {"_index": "test_index", "_type": "test_type", "_id": "u1"}}' | ||
- '{"user": "u1", "followers": ["u2", "u3"]}' | ||
- '{"index": {"_index": "test_index", "_type": "test_type", "_id": "u2"}}' | ||
- '{"user": "u2", "followers": ["u1", "u3", "u4"]}' | ||
- '{"index": {"_index": "test_index", "_type": "test_type", "_id": "u3"}}' | ||
- '{"user": "u3", "followers": ["u1"]}' | ||
- '{"index": {"_index": "test_index", "_type": "test_type", "_id": "u4"}}' | ||
- '{"user": "u4", "followers": ["u3"]}' | ||
|
||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index | ||
body: {"query" : {"terms" : {"user" : ["u1", "u2"]}}} | ||
- match: { hits.total: 2 } | ||
|
||
- do: | ||
catch: bad_request | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index | ||
body: {"query" : {"terms" : {"user" : ["u1", "u2", "u3"]}}} | ||
|
||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index | ||
body: {"query" : {"terms" : {"user" : {"index" : "test_index", "type" : "test_type", "id" : "u1", "path" : "followers"}}}} | ||
- match: { hits.total: 2 } | ||
|
||
- do: | ||
catch: bad_request | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index | ||
body: {"query" : {"terms" : {"user" : {"index" : "test_index", "type" : "test_type", "id" : "u2", "path" : "followers"}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"shapeBytes" should be "shape"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍