-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Enable aggregatable for special fields in index pattern #3284
Enable aggregatable for special fields in index pattern #3284
Conversation
b408e59
to
53e8733
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.
@blacktop Can you have also a quick look?
So the way I fixed it was to add this: https://github.com/blacktop/brobeat/blob/master/scripts/generate_index_pattern.py#L99 Which is over-kill as your solution is much simpler, however, the only thing that is different is that the meta_fields = [
{
"name": "_id",
"type": "string",
"count": 0,
"scripted": False,
"indexed": False,
"analyzed": False,
"doc_values": False,
"searchable": False,
"aggregatable": False,
},
{
"name": "_type",
"type": "string",
"count": 0,
"scripted": False,
"indexed": False,
"analyzed": False,
"doc_values": False,
"searchable": True, <===========================
"aggregatable": True, <===========================
},
{
"name": "_index",
"type": "string",
"count": 0,
"scripted": False,
"indexed": False,
"analyzed": False,
"doc_values": False,
"searchable": False,
"aggregatable": False,
},
{
"name": "_score",
"type": "number", <=======================
"count": 0,
"scripted": False,
"indexed": False,
"analyzed": False,
"doc_values": False,
"searchable": False,
"aggregatable": False,
},
]
Also, I think the defaults will make the meta-fields, This can been seen in your code here - https://github.com/monicasarbu/beats/blob/53e873325a51bfaa85b78b48b2e3bf3f32538bb6/libbeat/scripts/generate_index_pattern.py#L44 field = {
"name": path,
"count": 0,
"scripted": False,
"indexed": True, <=======================
"analyzed": False,
"doc_values": True, <=======================
"searchable": True, <=======================
"aggregatable": True, <=======================
} Also kibana makes |
e44353d
to
d13f064
Compare
92ffd1b
to
a6f496a
Compare
@blacktop I have updated the PR to set the fields ( |
Use keyword for special fields(
_index
,_id
,_type
and_score
). This depends on #3282.