-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Make typeless APIs usable with indices whose type name is different from _doc
#35790
Merged
jpountz
merged 13 commits into
elastic:master
from
jpountz:enhancement/typeless_apis_work_with_any_type
Dec 4, 2018
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d376d9d
Make typeless APIs usable with indices whose type name is different f…
jpountz 718cf42
iter
jpountz 29ede50
Merge branch 'master' into enhancement/typeless_apis_work_with_any_type
jpountz f0a5d50
iter
jpountz 5f5c802
Add tests.
jpountz 3bfb13f
Merge branch 'master' into enhancement/typeless_apis_work_with_any_type
jpountz e8a6b2b
Merge branch 'master' into enhancement/typeless_apis_work_with_any_type
jpountz 13e9539
iter
jpountz 981db1e
Merge branch 'master' into enhancement/typeless_apis_work_with_any_type
jpountz 10bb764
iter
jpountz 9619fe4
Review feedback.
jpountz 9bc3cc5
Merge branch 'master' into enhancement/typeless_apis_work_with_any_type
jpountz a7d6130
iter
jpountz 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
34 changes: 34 additions & 0 deletions
34
rest-api-spec/src/main/resources/rest-api-spec/test/bulk/70_mix_typeless_typeful.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,34 @@ | ||
--- | ||
"bulk without types on an index that has types": | ||
|
||
- skip: | ||
version: " - 6.99.99" | ||
reason: Typeless APIs were introduced in 7.0.0 | ||
|
||
- do: | ||
indices.create: # not using include_type_name: false on purpose | ||
index: index | ||
body: | ||
mappings: | ||
not_doc: | ||
properties: | ||
foo: | ||
type: "keyword" | ||
- do: | ||
bulk: | ||
refresh: true | ||
body: | ||
- index: | ||
_index: index | ||
_id: 0 | ||
- foo: bar | ||
- index: | ||
_index: index | ||
_id: 1 | ||
- foo: bar | ||
|
||
- do: | ||
count: | ||
index: index | ||
|
||
- match: {count: 2} |
33 changes: 33 additions & 0 deletions
33
rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/30_mix_typeless_typeful.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,33 @@ | ||
--- | ||
"mtermvectors without types on an index that has types": | ||
|
||
- skip: | ||
version: " - 6.99.99" | ||
reason: Typeless APIs were introduced in 7.0.0 | ||
|
||
- do: | ||
indices.create: # not using include_type_name: false on purpose | ||
index: index | ||
body: | ||
mappings: | ||
not_doc: | ||
properties: | ||
foo: | ||
type : "text" | ||
term_vector : "with_positions_offsets" | ||
|
||
- do: | ||
index: | ||
index: index | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- do: | ||
mtermvectors: | ||
body : | ||
docs: | ||
- | ||
_index : index | ||
_id : 1 | ||
|
||
- match: {docs.0.term_vectors.foo.terms.bar.term_freq: 1} |
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
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.
Small comment: inconsistent spacing in this test (extra newline in
mtermvectors.body.docs
, spaces before:
).