-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add documentation for JSON fields. #35281
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
Add documentation for JSON fields. #35281
Conversation
Pinging @elastic/es-search-aggs |
d4184d2
to
1d79ad2
Compare
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.
I left a couple of comments. Thanks for writing this up, its really useful to have documentation early on
The `json` mapping type allows an entire JSON object to be indexed as a single field, with support for simple | ||
queries on the field's contents. A `json` field can be useful for modelling objects with a large number of | ||
distinct subfields whose keys are not known in advance. This type of situation might arise arise when | ||
some data is generated directly by users, or by an external third-party application. |
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.
I think it would be useful to explain a bit more about the trade offs of using this vs explicitly mapping the object. For example one advantage of this is that we expect the resulting index to be smaller with the disadvantage of limited query support and no support for aggregations and sorting.
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.
Makes a lot of sense, I'll expand this section.
|
||
Leaf values longer than this limit will not be indexed. Defaults to the maximum integer value | ||
`2147483647` so that no values are skipped. Note that this limit applies to the leaf values | ||
within the JSON field, and not the length of the entire field. |
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.
Maybe we should just state that the default is to not skip values of any length rather than mentioning the explicit value here?
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.
Will fix, I copied this over from the keyword
documentation but reading it over again it is quite strange!
e4ee31c
to
2ffb459
Compare
1d79ad2
to
27fd00e
Compare
@colings86 I think this is ready for another look. |
27fd00e
to
87b8ce5
Compare
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.
LGTM but could you make sure all lines are wrapped to 80 characters before merging?
} | ||
-------------------------------- | ||
// CONSOLE | ||
|
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.
It might be better to mark this // TESTSETUP
then you don't need to mark the others // TEST[continued]
.
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.
👍
@elasticmachine run sample packaging tests |
@elasticmachine run gradle build tests |
e7613b7
to
4c46b07
Compare
After writing tests for all the query types, I noticed these positional queries will actually not work.
d94bf2a
to
03e0008
Compare
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
* Add documentation for JSON fields.
No description provided.