prior-art-archive / priorartarchive.org

Prior Art Archive Site
https://priorartarchive.org
GNU General Public License v2.0
3 stars 1 forks source link

Re-enable dateRange aggregator #53

Open reefdog opened 5 years ago

reefdog commented 5 years ago

Following on https://github.com/prior-art-archive/migration-2019/issues/5 and the work toward #16, we disabled the dateRange aggregator in 8f1c8bdbd2f8eea9a17f2c083d1c29b1401d187b. Don't want to forget.

Here's the error that having dateRange enabled was causing: "[unknown_named_object_exception] Unknown BaseAggregationBuilder [auto_date_histogram], with { line=1 & col=220 } :: {\"path\":\"/documents/_search\",\"query\":{},\"body\":\"{\\\"_source\\\":{\\\"excludes\\\":\\\"text\\\"},\\\"from\\\":0,\\\"size\\\":10,\\\"highlight\\\":{\\\"fields\\\":{\\\"text\\\":{}}},\\\"aggs\\\":{\\\"source\\\":{\\\"terms\\\":{\\\"field\\\":\\\"organizationId\\\"}},\\\"fileType\\\":{\\\"terms\\\":{\\\"field\\\":\\\"contentType\\\"}},\\\"dateRange\\\":{\\\"auto_date_histogram\\\":{\\\"field\\\":\\\"publicationDate\\\",\\\"buckets\\\":5}}},\\\"query\\\":{\\\"bool\\\":{\\\"must\\\":[{\\\"term\\\":{\\\"text\\\":\\\"cisco\\\"}},{\\\"term\\\":{\\\"text\\\":\\\"cisco\\\"}}]}}}\",\"statusCode\":400,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"unknown_named_object_exception\\\",\\\"reason\\\":\\\"Unknown BaseAggregationBuilder [auto_date_histogram]\\\",\\\"line\\\":1,\\\"col\\\":220}],\\\"type\\\":\\\"unknown_named_object_exception\\\",\\\"reason\\\":\\\"Unknown BaseAggregationBuilder [auto_date_histogram]\\\",\\\"line\\\":1,\\\"col\\\":220},\\\"status\\\":400}\"}"