Skip to content

Conversation

@imotov
Copy link
Contributor

@imotov imotov commented Mar 6, 2019

When a query is translated into script terms agg where key has a date
type, it should generate a terms agg with value_type long instead of
date, otherwise the key gets formatted as a string, which confuses
hit extractor.

Fixes #37042

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

When a query is translated into script terms agg where key has a date
type, it should generate a terms agg with value_type long instead of
date, otherwise the key gets formatted as a string, which confuses
hit extractor.

Fixes elastic#37042
@imotov imotov force-pushed the issue-37042-date-in-key-extractor branch from 014ccd9 to 1721716 Compare March 7, 2019 14:42
Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good catch!

@costin costin self-requested a review March 7, 2019 15:42
Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imotov imotov merged commit e51665b into elastic:master Mar 8, 2019
imotov added a commit that referenced this pull request Mar 11, 2019
When a query is translated into script terms agg where key has a date
type, it should generate a terms agg with value_type long instead of
date, otherwise the key gets formatted as a string, which confuses
hit extractor.

Fixes #37042
imotov added a commit that referenced this pull request Mar 11, 2019
When a query is translated into script terms agg where key has a date
type, it should generate a terms agg with value_type long instead of
date, otherwise the key gets formatted as a string, which confuses
hit extractor.

Fixes #37042
imotov added a commit that referenced this pull request Mar 12, 2019
When a query is translated into script terms agg where key has a date
type, it should generate a terms agg with value_type long instead of
date, otherwise the key gets formatted as a string, which confuses
hit extractor.

Fixes #37042
@imotov imotov deleted the issue-37042-date-in-key-extractor branch May 1, 2020 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL: grouping by double casted date value throws exception

6 participants