Age | Commit message (Collapse) | Author |
|
This commit is a simple cleanup to remove an unnecessary extra method on
ScriptService which was only used in 3 places. There is now only one
search method.
|
|
|
|
SearchSourceBuilder#toXContent prints out a complete object, hence it should implement ToXContentObject
|
|
This change removes the field data specialization needed for the parent field and replaces it with
a simple DocValuesIndexFieldData. The underlying global ordinals are retrieved via a new function called
IndexOrdinalsFieldData#getOrdinalMap.
The children aggregation is also modified to use a simple WithOrdinals value source rather than the deleted WithOrdinals.Parent.
Relates #20257
|
|
This method has been removed in core (see #24714)
|
|
|
|
|
|
This method is not used and not tested. While it exists it forces
implementations of the interface to implement it while it's unused.
|
|
This fixes a bug in the 'date_histogram' aggregation that can happen when using 'extended_bounds'
together with some 'offset' parameter. Offsets should be applied after rounding the extended bounds
and also be applied when adding empty buckets during the reduce phase in InternalDateHistogram.
Closes #23776
|
|
|
|
|
|
Related to #23331
|
|
Related to #23331
|
|
SearchResponse#fromXContent allows to parse a search response, including search hits, aggregations, suggestions and profile results. Only the aggs that we can parse today are supported (which means all of them but a couple that are left to support). SearchResponseTests reuses the existing test infra to randomize aggregations, suggestions and profile response.
Relates to #23331
|
|
This commit adds a new method to the SearchOperationListener that allows implementers to validate
the SearchContext immediately after it is retrieved from the active contexts. The listener may
throw a runtime exception if it deems the SearchContext is not valid and that the use of the context
should be terminated.
|
|
|
|
|
|
Approaching the release of 6.0 we need to sort out the usage of
`Version#minimumCompatibilityVersion` which was still set to 5.0.0.
Now this change moves it to the latest released version of 5.x (5.4 at this point)
to ensure we are compatible with the latest minor of the previous major. This change
also removes all the `_UNRELEASED` from the versions that where released and drops versions
that were never released and are not expected to be released (bugfixes in minors that are not
the latest in the previous major).
|
|
(#23241)
* Fix ArrayIndexOutOfBoundsException in Range Aggregation when no ranges are specified in the query
* Revert "Fix ArrayIndexOutOfBoundsException in Range Aggregation when no ranges are specified in the query"
This reverts commit ad57d8feb3577a64b37de28c6f3df96a3a49fe93.
* Fix range aggregation out of bounds exception when there are no ranges in a range or date_range query
* Fix range aggregation out of bounds exception when there are no ranges in the query
This fix is applied to range queries, date range queries, ip range queries and geo distance aggregation queries
|
|
In scripts (at least some of the languages), the terms dictionary and
postings can be access with the special _index variable. This is for
very advanced use cases which want to do their own scoring. The problem
is segment level statistics must be recomputed for every document.
Additionally, this is not friendly to the terms index caching as the
order of looking up terms should be controlled by lucene.
This change removes _index from scripts. Anyone using it can and should
instead write a Similarity plugin, which is explicitly designed to allow
doing the calculations needed for a relevance score.
closes #19359
|
|
Related to #23331
|
|
|
|
|
|
Adding a unit test to InternalAdjecencyMatrix that extends the shared InternalAggregationTestCase
that we use for testing aggregations.
Relates to #22278
|
|
This commit adds a deprecation warning if `_index` is used in scripts.
It is emitted each time a script is invoked, but not per document. There
is no test because constructing a LeafIndexLookup is quite difficult,
but the deprecation warning does show up in IndexLookupIT, there is just
no way to assert warnings in integ tests.
relates #19359
|
|
BytesReference (#24447)
Template script engines (mustache, the only one) currently return a
BytesReference that users must know is utf8 encoded. This commit
modifies all callers and mustache to have the template engine return
String. This is much simpler, and does not require decoding in order to
use (for example, in ingest).
|
|
|
|
The rendering methods in String and Long Significant String aggregations
and buckets are very similar. They can be factored out in the
InternalSignificantTerms class an InternalMappedSignificantTerms class.
|
|
This adds parsing to the InternalFilters aggregation.
|
|
This commit changes SignificantTerms.Bucket so that it is not an
abstract class anymore but an interface. It will be easier for the Java
High Level Rest Client to provide its own implementation of
SignificantTerms and SignificantTerms.Bucket. Also, it is now more
coherent with the others aggregations.
|
|
Conflicts:
core/src/test/java/org/elasticsearch/search/aggregations/bucket/filter/InternalFilterTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/global/InternalGlobalTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/missing/InternalMissingTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/InternalNestedTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/InternalReverseNestedTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/sampler/InternalSamplerTests.java
modules/parent-join/src/test/java/org/elasticsearch/join/aggregations/InternalChildrenTests.java
test/framework/src/main/java/org/elasticsearch/search/aggregations/InternalSingleBucketAggregationTestCase.java
|
|
|
|
|
|
|
|
When constructing an array list, if we know the size of the list in
advance (because we are adding objects to it derived from another list),
we should size the array list to the appropriate capacity in advance (to
avoid resizing allocations). This commit does this in various places.
Relates #24439
|
|
* Add parent-join module
This change adds a new module named `parent-join`.
The goal of this module is to provide a replacement for the `_parent` field but as a first step this change only moves the `has_child`, `has_parent` queries and the `children` aggregation to this module.
These queries and aggregations are no longer in core but they are deployed by default as a module.
Relates #20257
|
|
|
|
|
|
Relates to #22278
|
|
Conflicts:
core/src/test/java/org/elasticsearch/search/aggregations/bucket/histogram/InternalHistogramTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTermsTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/LongTermsTests.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsTests.java
|
|
This commit converts some final constant instance fields to class
fields.
|
|
This commit adds support for histogram and date_histogram agg compound order by refactoring and reusing terms agg order code. The major change is that the Terms.Order and Histogram.Order classes have been replaced/refactored into a new class BucketOrder. This is a breaking change for the Java Transport API. For backward compatibility with previous ES versions the (date)histogram compound order will use the first order. Also the _term and _time aggregation order keys have been deprecated; replaced by _key.
Relates to #20003: now that all these aggregations use the same order code, it should be easier to move validation to parse time (as a follow up PR).
Relates to #14771: histogram and date_histogram aggregation order will now be validated at reduce time.
Closes #23613: if a single BucketOrder that is not a tie-breaker is added with the Java Transport API, it will be converted into a CompoundOrder with a tie-breaker.
|
|
This adds parsing to all implementations of SingleBucketAggregations. They are mostly similar, so they share the common
base class `ParsedSingleBucketAggregation` and the shared base test `InternalSingleBucketAggregationTestCase`.
|
|
Previously query weight was created for each search hit that needed to compute inner hits,
with this change the weight of the inner hit query is computed once for all search hits.
Closes #23917
|
|
|
|
# Conflicts:
# core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTermsTestCase.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalMaxTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalStatsTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/avg/InternalAvgTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/InternalCardinalityTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/geobounds/InternalGeoBoundsTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/geocentroid/InternalGeoCentroidTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/min/InternalMinTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/InternalPercentilesTestCase.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/hdr/InternalHDRPercentilesRanksTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/tdigest/InternalTDigestPercentilesRanksTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/sum/InternalSumTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCountTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalSimpleValueTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/percentile/InternalPercentilesBucketTests.java
# core/src/test/java/org/elasticsearch/search/aggregations/pipeline/derivative/InternalDerivativeTests.java
# test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java
|
|
Related to #22278
|
|
|
|
|
|
AggregationsTests#testFromXContent verifies that parsing of aggregations works by combining multiple aggs at the same level, and also adding sub-aggregations to multi bucket and single bucket aggs, up to a maximum depth of 5.
|