Skip to content

Aggregation woes #8616

@NodexTech

Description

@NodexTech

Here is the mapping of my index - https://gist.github.com/NodexTech/02c8b95eef3abc3f1a44
Please note the "facets" object and that the fields inside it are NOT analyzed and have doc_values:true which should give me values such as non case folded or tokenized bucket values. This works as expected UNTIL an aggregation (ranged in this case) is added to the query at which point the return reverts back to retrieving the bucket values from the index and NOT the document.

Here is the query - https://gist.github.com/NodexTech/a673df667fed9255898f

Sometimes the query fails and returns NO aggregations for "contract_type" (arbitrary field) and sometimes it gives the right answers which leads me to believe it's cache related as I can change the date on the query (i/e go back 3 months) and it will work as expected.

It's very odd behavior, I am fairly new to ES and I am surprised that this would be a bug and not found by unit testing etc but I picked it up in a matter of using ES for less than a week so it might have slipped someone by!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions