Commit Graph

13822 Commits

Author SHA1 Message Date
Zachary Tong 00cc16cc6a Merge pull request #11778 from polyfractal/bugfix/11487
Aggregations: moving_avg model parser should accept any numeric
2015-06-19 10:55:28 -04:00
Clinton Gormley cda1f37ead Merge pull request #11773 from elastic/robin13-patch-1
Update stats.asciidoc
2015-06-19 16:48:12 +02:00
Zachary Tong ae742c4a03 Aggregations: moving_avg model parser should accept any numeric, not just doubles
Also changes the models to throw ParseExceptions instead of SearchParseExceptions, so that
the validation can be unit-tested.

Fixes #11487
2015-06-19 10:36:15 -04:00
Clinton Gormley 1bfaac7098 Fixed bad asciidoc 2015-06-19 16:33:14 +02:00
Clinton Gormley dd680669f5 Docs: Rewrote the upgrade section 2015-06-19 16:28:07 +02:00
caldwecr 1ac728d22b Docs: Update filter-aggregation.asciidoc
Replace the previous example which leveraged a range filter, which causes unnecessary confusion about when to use a range filter to create a single bucket or a range aggregation with exactly one member in ranges.

Closes #11704
2015-06-19 12:24:42 +02:00
Iarwa1n ef8ee12259 Fix exception message in RestRequest
Closes #11305
2015-06-19 11:06:23 +01:00
oyiadom 6437478d65 [doc] Add missing imports for Java bulk API doc
I was unable to get my BulkProcessor script to work without importing the "ByteSizeUnit" and "ByteSizeValue" classes.  Perhaps I overlooked something in the example and do not understand its code.
2015-06-19 09:21:56 +02:00
Ryan Ernst caa40df328 Mappings: Hide more fieldType access and cleanup null_value merging
There were some missed uses of AbstractFieldMapper.fieldType in #11764.
This change also moves null_value merging into AbstractFieldMapper.
2015-06-18 15:58:30 -07:00
Ryan Ernst bfc4b8dd10 Merge pull request #11764 from rjernst/fix/field-type-ref
Replace fieldType access in mappers with getter
2015-06-18 13:01:07 -07:00
Ryan Ernst f09e0d7fb4 Mappings: Replace fieldType access in mappers with getter
A small refactoring to allow changing how the field type is stored later.
2015-06-18 11:47:38 -07:00
Shay Banon 341e980c52 [TEST] Use the correct renamed setting
and make the default value setting private
2015-06-18 20:40:07 +02:00
Simon Willnauer 1b2a3d0af6 Add @Repeat to forbidden APIs
@Repeat should not be committed just like @Seed.
Use -Pdev to run annotated methods.
2015-06-18 20:34:02 +02:00
Shay Banon 6d2ca116b9 [TEST] assertBusy on hasUnassigned
on fast machines, node leave might not move shards to unassigned right away, wait for it
2015-06-18 20:30:25 +02:00
Shay Banon 256f3d21ce Reset registeredNextDelaySetting on reroute
Need to reset the registered setting in order to make sure the nex round will capture the right delay interval

also randomize setting and name the setting properly

closes #11759
2015-06-18 20:20:49 +02:00
Jack Conradson 917aeb7278 Scripting: Allow executable expression scripts for aggregations
Added several classes to support expressions being used for numerical
calculations in aggregations.  Expressions will still not compile
when used with mapping and update script contexts.

Closes #11596
Closes #11689
2015-06-18 10:57:38 -07:00
Ryan Ernst 3fad16ac46 Merge pull request #11758 from rjernst/fix/empty-iterators
Add Iterators.emptyIterator to forbidden apis
2015-06-18 10:17:01 -07:00
Ryan Ernst 9157a11047 Build: Add Iterators.emptyIterator to forbidden apis
As a follow up to #11741, this forbids Iterators.emptyIterator in
favor the of builtin Collections.emptyIterator.
2015-06-18 10:12:58 -07:00
David Pilato 8c21a84b09 Merge pull request #11755 from dadoonet/azure/fix-tests-bytesize
[test] ByteSizeUnit.BYTES should be explicitly set
2015-06-18 18:25:59 +02:00
David Pilato 42f852d399 [test] ByteSizeUnit.BYTES should be explicitly set
With a recent change in core, we don't support anymore non explicit byte size units when setting values.
This commit fix that in azure repository. Otherwise, tests can't be executed.
2015-06-18 17:29:10 +02:00
Simon Willnauer 87946ba3b2 Allow security rule for advanced SSL configutation
if plugins need to install SSL factories etc. we have to allow
to `setFactory` in the security policy.
2015-06-18 16:50:35 +02:00
Shay Banon 792a545633 Optional Delayed Allocation on Node leave
Allow to set delayed allocation timeout on unassigned shards when a node leaves the cluster. This allows to wait for the node to come back for a specific period in order to try and assign the shards back to it to reduce shards movements and unnecessary relocations.

The setting is an index level setting under `index.unassigned.node_left.delayed_timeout` and defaults to 0 (== no delayed allocation). We might want to change the default, but lets do it in a different change to come up with the best value for it. The setting can be updated dynamically.

When shards are delayed, a log message with "info" level will notify how many shards are being delayed.

An implementation note, we really only need to care about delaying allocation on unassigned replica shards. If the primary shard is unassigned, anyhow we are going to wait for a copy of it, so really the only case to delay allocation is for replicas.

close #11712
2015-06-18 16:06:02 +02:00
Simon Willnauer 30cc984565 [TEST] fix TermsAggregationSearchBenchmark 2015-06-18 15:06:49 +02:00
Simon Willnauer 5808102d19 Upgrade AWS dependency to 1.10.0
This also apgrades JodaTime to 2.8.0.
2015-06-18 14:04:38 +02:00
Tanguy Leroux 8bd3d7e4a4 Fix number of deleted/missing documents in Delete-By-Query
The deleted counter is incremented even if the document is missing. Also, this commit ensures that the scroll id is cleared even if no documents are found by the scan request.
2015-06-18 13:09:42 +02:00
Simon Willnauer 85dccdb8ab Use UTC as timeszone for index creation date 2015-06-18 11:15:40 +02:00
Simon Willnauer 2a63249441 Add DateTime ctors without timezone to forbidden APIs
Using DateTime with default timezone is asking for trouble and should
be added to forbidden APIs
2015-06-18 10:43:45 +02:00
Isabel Drost-Fromm 2fa56899d6 Merge pull request #11696 from MaineC/feature/simple-query-string-addboost
Add support for query boost to SimpleQueryStringBuilder.

Relates to #10217
2015-06-18 10:10:57 +02:00
Shay Banon cc97a4159e remove 1.7 version check 2015-06-18 09:34:39 +02:00
David Pilato 68aacb7078 Merge pull request #11741 from dadoonet/cleanup/emptyiterator
Replace Iterators#emptyIterator by JDK one
2015-06-18 08:51:17 +02:00
David Pilato 6a466b9a00 Replace Iterators#emptyIterator by JDK one
`com.google.common.collect.Iterators#emptyIterator()` is marked as deprecated and will be removed in May 2016. We should use JDK7 `Collections#emptyIterator()`
2015-06-18 08:47:31 +02:00
Igor Motov b2000a48a4 Snapshot/Restore: Add snapshot name validation logic to all snapshot operation
Make sure snapshot name validation occurs earlier in all snapshot operations.
2015-06-17 19:13:35 -04:00
Igor Motov 36da42c93b Show human readable Elasticsearch version that created index and date when index was created
By setting human parameter to true, it's now possible to see human readable versions of Elasticsearch that created and updated the index as well as the date when the index was created.

Closes #11484
2015-06-17 18:52:01 -04:00
Alex Ksikes 3f6dae1a73 More Like This: renamed `ignore_like` to `unlike`
This changes the parameter name `ignore_like` to the more user friendly name
`unlike`. This later feature generates a query from the terms in `A` but not
from the terms in `B`. This translates to a result set which is like `A` but
unlike `B`. We could have further negatively boosted any documents that have
some `B`, but these documents already do not receive any contribution from
having `B`, and would therefore negatively compete with documents having `A`.

Closes #11117
2015-06-17 17:18:50 -05:00
Simon Willnauer 90f9b5f60d Allow to opt-out of loading packaged REST tests
this is really just a workaround for plugins to run their own
REST tests instead of the core ones. It opts out of the rest test
loading from the core jar file and tries to load from the classpath instead.
Eventually we need to fix this infrastrucutre to move away from parameterized
tests such that subclasses can override behavior.

Closes #11721
2015-06-17 20:37:59 +02:00
Clinton Gormley fdc46103d3 Merge pull request #11705 from clintongormley/licenses
Packaging: Add LICENSE and NOTICE files for all core dependencies
2015-06-17 18:06:55 +02:00
Clinton Gormley 05d512f417 Packaging: Add LICENSE, NOTICE, and sha1 files and tests for all core dependencies
Added a licenses/ directory to core which contains a sha1 file for each JAR
dependency, and one or more LICENSE files and one NOTICE file for each
project.

Also adds dev-tools/src/main/resources/license-check/check_license_and_sha.pl
which checks that the licenses/ dir is up to date during a mvn verify,
and which can be used to update the sha1 files when upgrading dependencies.

Closes #2794
Closes #10684
Closes #11705
2015-06-17 18:06:00 +02:00
Michael McCandless 6fd893e10d Balance new shard allocations more evenly across multiple path.data
This change adds a simplistic heuristic to try to balance new shard
allocations across multiple data paths on one node so that e.g. if
there are two path.data and both have roughly the same free space, if
10 shards are suddenly allocated, we will put 5 on one path and 5 on
the other (vs 10 on a single path today).

Closes #11185

Closes #11122
2015-06-17 10:28:38 -04:00
Tanguy Leroux ba3540675a Add delete-by-query plugin
The delete by query plugin adds support for deleting all of the documents (from one or more indices) which match the specified query. It is a replacement for the problematic delete-by-query functionality which has been removed from Elasticsearch core in 2.0. Internally, it uses the Scan/Scroll and Bulk APIs to delete documents in an efficient and safe manner. It is slower than the old delete-by-query functionality, but fixes the problems with the previous implementation.

Closes #7052
2015-06-17 14:52:25 +02:00
Simon Willnauer 0434ecfb03 Merge pull request #11464 from nirmalc/nodes-preference
Search `preference` based on node specification
2015-06-17 12:33:51 +02:00
Isabel Drost-Fromm 5e9106ae5e Fixing review comments. 2015-06-17 11:18:32 +02:00
Isabel Drost-Fromm 907cdc61f7 Add boost to SimpleQueryStringBuilder.
As per discussion in #11274 this adds support for query boosting
to the SimpleQueryStringQuery.
2015-06-17 10:49:52 +02:00
Boaz Leskes f4a143d138 Clarify refresh parameter in the `_bulk` API
See #11690
Closes #11691
2015-06-17 08:47:40 +02:00
Adrien Grand 17fac6dad5 Merge pull request #11568 from jpountz/remove/rivers
Rivers removal.
2015-06-17 08:20:48 +02:00
Adrien Grand 6e15e08f5e Merge pull request #11693 from jpountz/fix/simplify_timestamp_dv
Simplify doc values handling for _timestamp.
2015-06-17 08:19:33 +02:00
Nirmal Chidambaram 72a9d34eb8 5925 - Allow node specification in preference
-Allow node selector api's with new preference
ONLY_NODES ( selector apis like https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html)

-Update documentation
2015-06-16 11:49:12 -05:00
Adrien Grand 891689ed1e Merge pull request #11697 from jpountz/fix/synchronous_fielddata_removal
Reclaim memory from fielddata synchronously when an explicit clear is performed.
2015-06-16 17:36:29 +02:00
Shay Banon 4e0d65453f Add Unassigned meta data
Unassigned meta includes additional information as to why a shard is unassigned, this is especially handy when a shard moves to unassigned due to node leaving or shard failure.

The additional data is provided as part of the cluster state, and as part of `_cat/shards` API.

The additional meta includes the timestamp that the shard has moved to unassigned, allowing us in the future to build functionality such as delay allocation due to node leaving until a copy of the shard is found.
closes #11653
2015-06-16 17:01:48 +02:00
Tanguy Leroux 3b4ca8e399 Create PID_DIR in init.d script
Since the /var/run/elasticsearch directory is cleaned when the operating system starts, the init.d script must ensure that the PID_DIR is correctly created.

Closes #11594
2015-06-16 16:16:29 +02:00
Adrien Grand 28e88e5bc0 Reclaim memory from fielddata synchronously when an explicit clear is performed.
The cache we are using for fielddata reclaims memory lazily/asynchronously. While this
helps with throughput this is an issue when a clear operation is issued manually since
memory is not reclaimed immediately. Since our clear methods already perform in linear
time anyway, this commit changes the fielddata cache to reclaim memory synchronously
when a clear command is issued manually. However, it remains lazy in case cache entries
are invalidated because segments or readers are closed, which is important since such
events happen all the time.

Close #11695
2015-06-16 12:08:39 +02:00