Skip to content
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

Factor parameter in Date Histogram aggregation not accepted #6490

Closed
junckritter opened this issue Jun 12, 2014 · 5 comments
Closed

Factor parameter in Date Histogram aggregation not accepted #6490

junckritter opened this issue Jun 12, 2014 · 5 comments
Assignees

Comments

@junckritter
Copy link

According to documentation (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html#_factor_2) date histogram aggregation should accept factor parameter. But using it results in

Parse Failure [Unknown key for a VALUE_NUMBER in [agg]: [factor].]

Query example:

"aggs" : { 
    "registration": {
        "date_histogram": {
            "field": "registration_date",
            "interval": "day", 
            "format": "dd-MM-yyyy",
            "min_doc_count": 0,
            "extended_bounds": {
                "min": "now/d-30d",
                "max": "now/d"
            },
            "factor": 1000  
        }
    }
}

Without factor, query works just fine.

Using version 1.1.2, but looking to source of master (https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramParser.java#L124), factor is not used there neither.

@RyanNielson
Copy link

I'm running into the same issue. Any word on this as it's causing some parsing errors on my end which means I have to use facets for now.

@clintongormley
Copy link

@uboness it looks like factor isn't supported in date histo aggs, even though it is documented:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html#_factor_2

@clintongormley
Copy link

@jpountz are there plans to support factor or in date_histos or should we drop it? I'd be in favour of dropping it. date histos should be run on date fields.

@jpountz
Copy link
Contributor

jpountz commented Aug 18, 2014

@clintongormley I would be +1 on dropping it as well and requiring the field to be either a date or unmapped in order for a date aggregation to succeed.

@clintongormley
Copy link

Agreed - closing

clintongormley pushed a commit that referenced this issue Aug 18, 2014
The current implementation of 'date_histogram' does not understand
the `factor` parameter. Since the docs shouldn't raise false hopes,
I removed the section.

Closes #7277
clintongormley pushed a commit that referenced this issue Aug 18, 2014
The current implementation of 'date_histogram' does not understand
the `factor` parameter. Since the docs shouldn't raise false hopes,
I removed the section.

Closes #7277
areek pushed a commit that referenced this issue Sep 8, 2014
The current implementation of 'date_histogram' does not understand
the `factor` parameter. Since the docs shouldn't raise false hopes,
I removed the section.

Closes #7277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants