Commit Graph

6925 Commits

Author SHA1 Message Date
Areek Zillur af6b69e791 Ensure empty completion entries are never indexed
closes #10987
2015-05-14 16:48:49 -04:00
Jack Conradson df59288b72 Fixed a broken import in MultiValueMode. 2015-05-14 09:53:26 -07:00
Jack Conradson a5c0ac0d67 Scripting: Add Multi-Valued Field Methods to Expressions
Add methods to operate on multi-valued fields in the expressions language.
Note that users will still not be able to access individual values
within a multi-valued field.

The following methods will be included:

* min
* max
* avg
* median
* count
* sum

Additionally, changes have been made to MultiValueMode to support the
new median method.

closes #11105
2015-05-14 08:27:24 -07:00
Robert Muir c949ce00e8 Add test group for third-party tests 2015-05-13 14:34:53 -04:00
Robert Muir 33fd25083e Merge pull request #11134 from rmuir/tests_config
Add tests.config support to BootstrapForTesting
2015-05-13 11:35:16 -04:00
Adrien Grand b64e54c424 Merge pull request #11137 from jpountz/enhancement/geo_queries
Query DSL: Make geo filters queries.
2015-05-13 17:27:15 +02:00
Simon Willnauer 869baeea0c Don't throw an exception if repositories are unregister with match all
Today we barf if repositories are unregistered with a `*` pattern. This
happens on almost every test and adds weird log messages. I dont' think
we should barf in that case.

Closes #11113
2015-05-13 17:01:04 +02:00
Simon Willnauer 6a43fe348d Fail recovery if retry recovery if resetRecovery fails
This might fail if the shard is closed for instance. This will leak
a shard lock causing the shard being locked on this node forever.
2015-05-13 16:47:18 +02:00
javanna add18a5c99 Java api: remove duplicated buildAsBytes and corresponding toString methods
We have some builders, specifically query builders, `SearchSourceBuilder`, `QuerySourceBuilder` and `SuggestBuilder`, that implement `ToXContent` and also allow to build their content as bytes by simply creating a `BytesReference` that holds their json (or yaml etc.) content (`buildAsBytes` methods). They can also print out their content through `toString`. Made sure that those common methods are in one single place and reused where needed.

Also, merged `QueryBuilder` and `BaseQueryBuilder` and made `QueryBuilder` an abstract class instead of an interface.

Closes #11063
2015-05-13 16:14:16 +02:00
javanna d2765a2e26 Java api: add missing rewrite parameter to FuzzyQueryBuilder
We parse the rewrite field in FuzzyQueryParser but we don't allow to set it via FuzzyQueryBuilder for our java api users. Added missing field and setter.

Closes #11130
Closes #11139
2015-05-13 15:46:57 +02:00
Dawid Weiss 491b00c4ec Updating to HPPC-0.7.1
Close #11035
2015-05-13 13:53:14 +02:00
Adrien Grand 472cc0af08 Merge pull request #11142 from jpountz/feature/bool_filter
Query DSL: Add `filter` clauses to `bool` queries.
2015-05-13 12:25:32 +02:00
Adrien Grand 630757906a Query DSL: Add `filter` clauses to `bool` queries.
These clauses filter the document space without affecting scoring and map to
Lucene's BooleanClause.Occur.FILTER. The `filtered` query is now deprecated and

```json
{
  "filtered": {
    "query": { //query },
    "filter": { //filter }
  }
}
```
should be replaced with
```json
{
  "bool": {
    "must": { //query },
    "filter": { //filter }
  }
}
```
2015-05-13 12:04:56 +02:00
Shay Banon ba20d4b6ba [TEST] fix unintended relocation 2015-05-13 11:18:28 +02:00
Adrien Grand 36884807b3 Merge pull request #11120 from jpountz/fix/bool_parsing
Query DSL: Fix `bool` parsing.
2015-05-13 11:09:12 +02:00
Adrien Grand 11db3170cd Query DSL: Fix `bool` parsing.
In #10985 I introduced a bug that should clauses are parsed as filters while
must_not clauses should be parsed as filters.
2015-05-13 11:08:36 +02:00
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 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
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 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
Britta Weber 24ffcc28ac fix merge conflict in javadoc 2015-05-12 14:40:56 +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
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