Commit Graph

11958 Commits

Author SHA1 Message Date
Simon Willnauer 6046ecbab3 Prevent PercolateResponse from serializing negative VLong
We are using a a VLong to serialize the PercolateResponse#tookInMillis. This
can due to several `System.currentTimeMillis()` implemenation details be negative.
We should prevent the negavite value for being serialized as a VLong and make sure
we use a valid value for this in the first place

Closes #11138
2015-05-13 10:22:08 +02:00
Adrien Grand f22935b1a8 Query DSL: Make geo filters queries.
This commit replaces geo filters with queries that support two-phase iteration.
2015-05-13 09:10:49 +02:00
Ryan Ernst 1b15333f34 Merge pull request #11074 from rjernst/pr/include-in-object-removal
Mappings: Remove ability to set meta fields inside documents
2015-05-12 23:24:36 -07:00
Ryan Ernst f766b260ba Add tests for includeInObject backcompat 2015-05-12 23:11:15 -07:00
Ryan Ernst 565ffb16f1 Mappings: Remove ability to set meta fields inside documents
A few meta fields can currently be set within a document's source.
However, the recommended way to set meta fields like this is through
the api, and setting within the document can be a performance trap
(e.g. needing to find _id in order to route the document).

This change removes the ability to set meta fields within
a document source for 2.0+ indexes.

closes #11051
closes #11074
2015-05-12 23:09:03 -07:00
Robert Muir 5deba7264c Add tests.config support to BootstrapForTesting
Several plugins (e.g. elasticsearch-cloud-aws, elasticsearch-cloud-azure, elasticsearch-cloud-gce)
have integration tests that run with actual credentials to a remote service, so test runs
need access to this file.

These all require the tester (or jenkins) to supply the file with -Dtests.config.
2015-05-12 21:23:17 -04:00
Igor Motov d6efe1e508 Docs: Add information about restoring to a different cluster 2015-05-12 20:59:24 -04:00
Robert Muir 79023c1e61 Merge pull request #11132 from rmuir/lockdown6
Remove unnecessary permissions.
2015-05-12 20:03:20 -04:00
Robert Muir 4473bb4275 Remove unnecessary permissions. 2015-05-12 19:15:59 -04:00
Lee Hinman 990c3a9093 Merge remote-tracking branch 'dakrone/acquire-write-lock-on-delete' 2015-05-12 13:23:09 -06:00
Lee Hinman f7e8d7c024 [CORE] Acquire IndexWriter's `write.lock` lock before shard deletion
In `NodeEnvironment.deleteShardDirectoryUnderLock`, we will now attempt
to acquire, then release, the `write.lock` file for the Lucene index in
question to ensure that no other `IndexWriter` has the directory open
before deleting the data.

Note that the `write.lock` file must be released before the actual
deletion in order to allow the directory to be deleted.

Fixes #11097
2015-05-12 13:19:29 -06:00
Robert Muir 262555079c Merge pull request #11106 from rmuir/symlink
Improve path mgmt on init, better error messages, symlink support
2015-05-12 14:21:19 -04:00
Adrien Grand 2999ea9558 Merge pull request #11126 from jpountz/fix/script_query
Query DSL: Make the script filter a query.
2015-05-12 19:33:17 +02:00
Adrien Grand 6936577c6e Query DSL: Make the script filter a query.
This change changes the script filter so that it produces scorers with two-phase
iteration support instead of doc id sets with random-access.
2015-05-12 19:20:37 +02:00
Adrien Grand 842608c396 Merge pull request #11125 from jpountz/upgrade/lucene-5.2.0-snapshot-1678978
Upgrade to lucene-5.2.0-snapshot-1678978.
2015-05-12 18:53:56 +02:00
Adrien Grand 290fefcdf8 Upgrade to lucene-5.2.0-snapshot-1678978. 2015-05-12 18:49:51 +02:00
Britta Weber 24ffcc28ac fix merge conflict in javadoc 2015-05-12 14:40:56 +02:00
Britta Weber 272babd9dc [TEST] add comment bout security manager to bwc test description 2015-05-12 10:26:42 +02:00
markharwood 89b95dccc8 Aggregations enhancement - remove pointless term frequency lookups.
If the user has set a shard_min_doc_count setting then avoid looking up background frequencies if the term fails to meet the foreground threshold on a shard.

Closes #11093
2015-05-12 08:45:17 +01:00
Simon Willnauer 236f6ccad7 [TEST] Reduce likelyness of sync on every operation 2015-05-12 09:32:12 +02:00
Robert Muir d1defef69d Properly handle the case where symlinks are supported, but
the user is not a windows administrator (can throw IOE in this case)
2015-05-12 00:53:51 -04:00
Robert Muir 019a9410a3 SecurityBootstrap -> BootstrapForTesting, and make less things public 2015-05-12 00:34:02 -04:00
Robert Muir 2cea5f2b38 Improve path management on init:
* Properly support symlinks (e.g. /tmp -> /mnt/tmp)
* Check all configured paths up front and deliver the best exception we can when things are wrong
* Initialize securitymanager earlier
* Fix too-loud error logging of Natives root check
2015-05-12 00:20:52 -04:00
Robert Muir 7c2a8dfb9e Merge pull request #11104 from rmuir/generate_paths
Generate access to tests paths like other paths.
2015-05-11 18:32:26 -04:00
Robert Muir 3ccdde7e2a Generate access to tests paths like other paths. 2015-05-11 18:04:14 -04:00
Ryan Ernst e7618b8528 Settings: Remove file based index templates
As a follow up to #10870, this removes support for
index templates on disk. It also removes a missed
place still allowing disk based mappings.

closes #11052
2015-05-11 12:51:22 -07:00
gmarz 6dcd5bf618 [TEST] Mlockall: Removing assertTrue until we have the proper test infra 2015-05-11 13:51:59 -04:00
gmarz 852482844c [TEST] Only check if mlockall succeeds on Windows for now 2015-05-11 12:12:32 -04:00
Michael McCandless 08f7caa56b Use System.nanoTime when measuring elapsed time
System.currentTimeMillis is more vulnerable when the clock shifts.

Closes #11058
2015-05-11 11:24:04 -04:00
gmarz cc3f02c0a0 [TEST] Fix mlockall test when running on Windows 2015-05-11 11:09:15 -04:00
gmarz 4fc08aa019 Revert "Revert "VirtualLock implementation for Windows (mlockall equivalent)""
This reverts commit 5dc8b99365.
2015-05-11 10:17:28 -04:00
Robert Muir 4b345ca78f Merge pull request #11069 from rmuir/ban_pathutils
Ban PathUtils.get (for now, until we fix the two remaining issues)
2015-05-11 08:52:45 -04:00
Colin Goodheart-Smithe 671e3ef074 Aggregations: Fix geo bounds aggregation when longitude is 0
When the longitude is zero for a document, the left and right bounds do not get updated in the geo bounds aggregation which can cause the bounds to be returned with Infinite values for longitude

Closes #11085
2015-05-11 13:43:13 +01:00
javanna 36c373e615 [DOCS] documented missing query_string parameters for count, exists, search & validate_query
relates to #11057
2015-05-11 12:58:30 +02:00
Colin Goodheart-Smithe 75ea807e63 [TEST] Remove ScriptTransformBackwardsCompatibilityTests 2015-05-11 11:01:48 +01:00
javanna d7e585ca4f REST: Unify query_string parameters parsing
There currently are small differences between search api and count, exists, validate query, explain api when it comes to reading query_string parameters.  `analyze_wildcard`, `lowercase_expanded_terms` and `lenient` are only read by the search api and ignored by all other mentioned apis. Unified code to fix this and make sure it doesn't happen again. Also shared some code when it comes to printing out the query as part of SearchSourceBuilder conversion to ToXContent.

Extended REST spec to include all the supported params (some that were already supported weren't listed), and added REST tests (also some basic tests for count and search_exists which weren't tested at all).

Closes #11057
2015-05-11 11:32:59 +02:00
Adrien Grand d577c07768 Internal: close caches after IndicesService. 2015-05-11 11:10:00 +02:00
Simon Willnauer 5578499d61 [TEST] Only corrupt translog header today we can't detecte truncation corruption 2015-05-11 10:34:26 +02:00
Shay Banon 9bd5df1e31 [TEST] use the correct translog setting 2015-05-11 10:24:19 +02:00
Simon Willnauer 5dc8b99365 Revert "VirtualLock implementation for Windows (mlockall equivalent)"
All test runs fail on windowns with this commit.

This reverts commit 6f99f5d5b2.
2015-05-11 09:21:09 +02:00
Simon Willnauer 3f02c989dd [TEST] Fix storeStats tests if extraFS is involved 2015-05-10 20:49:37 +02:00
Britta Weber f7cfafee63 [TEST] enable inline scripting for test 2015-05-10 18:22:17 +02:00
Martijn van Groningen acdd9a5dd9 parent/child: Removed the `top_children` query. 2015-05-10 16:30:19 +02:00
javanna 9e01dedef5 Java api: remove redundant BytesQueryBuilder in favour of using WrapperQueryBuilder internally
BytesQueryBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperQueryBuilder could be used instead. Added WrapperQueryBuilder constructor that accepts a BytesReference as argument.

One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only query builder that allows to build a query through java api without having a respective query parser.

Closes #10919
2015-05-09 15:25:55 +02:00
javanna ba243e7a9d Java api: unify SearchResponse and BroadcastOperationResponse code around shards header
Different responses hold the shards header, search, count, flush etc. The code was duplicated in two different places, centralized in RestActions.
It turns out that only the search response printed out the status field before the reason, which was added to all other broadcast responses too.

Closes #11064
2015-05-09 14:55:28 +02:00
Igor Motov d2844e0210 Internal: prevent injection of unannotated dynamic settings
Dynamic settings has to be injected into constructor with either @ClusterDynamicSettings or @IndexDynamicSettings. If annotations are not specified an empty instance of Dynamic Settings is injected that can lead to difficult to discover errors such as #10614. This commit will make any attempt to inject unannotated dynamic settings to generate a giuce error.
2015-05-08 18:38:58 -04:00
Igor Motov 573cacab54 ThreadPool: make sure no leaking threads are left behind in case of initialization failure
Our ThreadPool constructor creates a couple of threads (scheduler and timer) which might not get shut down if the initialization of a node fails. A guice error might occur for example, which causes the InternalNode constructor to throw an exception. In this case the two threads are left behind, which is not a big problem when running es standalone as the error will be intercepted and the jvm will be stopped as a whole. It can become more of a problem though when running es in embedded mode, as we'll end up with lingering threads or testing an handling of initialization failures.

Closes #9107
2015-05-08 16:16:17 -04:00
Robert Muir 38cccfb057 cleanup and ban temp files going to jvm default location 2015-05-08 15:08:13 -04:00
Robert Muir 51c71c235b Ban PathUtils.get (for now, until we fix the two remaining issues) 2015-05-08 14:42:27 -04:00
Lee Hinman 459a05168c Merge remote-tracking branch 'refs/remotes/dakrone/truncate-loglines' 2015-05-08 10:11:26 -06:00