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.
I think we should take the opportunity to also add
version
as well, here. WDYT?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.
Good idea!
Does using
string
work here for theversion
data type or is there a more appropriate type to use?cc @andrewkroh
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.
And perhaps
constant_keyword
could be another addition 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.
Yeah, string seems like the best option for version. Another option would be a struct that has parameters that match up with the version data type (but I've never seen the version data type in ES so I have no idea what it looks like).
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.
version
is another type in the keyword family. So you can safely cram all manners of weird/incorrect version strings in it. But well-formatted ones will be queryable in new interesting ways.So I think the simple answer is to have it equivalent to a Go string.
I don't object to supporting
constant_keyword
here. But let me open a door for a moment🚪constant_keyword
will be tricky to add to "main ECS", because using it means any index not using it correctly will have ingestion screech to a halt when sending a second value for the field.I'm thinking it will have to be some sort of explicit opt-in, for folks who know they are adopting that specific strategy to splitting indices. Its usage will work much better with composable templates.
But we can close that door 🚪 and add
constant_keyword
as well 😂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.
Both
version
andconstant_keyword
have been added.We've had some recent discussions around
version
being akeyword
specialization type instead of a member of thekeyword
family. If that changes feelings around including it here (for now), I'm ok to remove.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.
Let's leave it in for now. I'm not sure if the incompatibility we saw in the field caps API call is an oversight or if it's here to stay. If it's here to stay, it's likely because the query possibilities are significantly greater with
version
(pun intended).But the structure of the data itself is best captured as a string in the various programming languages.