Commit Graph

4309 Commits

Author SHA1 Message Date
Jason Tedor 96c6ac2d3f Merge pull request #17176 from jasontedor/its-not-easy-being-green
Vagrant tests should be green
2016-03-18 15:28:37 -04:00
Simon Willnauer 99321f068f Revert "Revert "Merge pull request #17182 from s1monw/issues/17090""
This reverts commit b693a520ee.
2016-03-18 11:24:55 +01:00
Simon Willnauer b693a520ee Revert "Merge pull request #17182 from s1monw/issues/17090"
This reverts commit 0fe47f8136, reversing
changes made to 3b17ddcd46.
2016-03-18 10:37:44 +01:00
Simon Willnauer 0fe47f8136 Merge pull request #17182 from s1monw/issues/17090
Provide better error message when an incompatible node connects to a node

We should give a better exception message when an incompatible node connects
and we receive a messeage. This commit adds a clear excpetion based on the
protocol version received instead of throwing cryptic messages about not fully reaed
buffer etc.

Relates to #17090
2016-03-18 10:17:05 +01:00
Martijn van Groningen 3b17ddcd46 Removed old 1.x parent/child logic that should have been removed.
`0` really means, don't match any child docs.
2016-03-18 10:07:27 +01:00
Martijn van Groningen 1dd2be81c3 nested / parent child: Removed `total` score mode in favour of `sum` score mode.
Closes #17083
2016-03-18 10:07:26 +01:00
Simon Willnauer 7898522514 Provide better error message when an incompatible node connects to a node
We should give a better exception message when an incompatible node connects
and we receive a messeage. This commit adds a clear excpetion based on the
protocol version received instead of throwing cryptic messages about not fully reaed
buffer etc.

Relates to #17090
2016-03-18 09:51:00 +01:00
Ryan Ernst 69ff402b62 Still create the archive name for core as elasticsearch 2016-03-17 13:35:16 -07:00
Jason Tedor 9f73152940 Fix plugins permissions 2016-03-17 15:35:54 -04:00
Jason Tedor dacb96ba61 Fix plugin installation logging 2016-03-17 15:35:54 -04:00
Jason Tedor ebdacb1297 Fix list of modules and official plugins 2016-03-17 15:35:54 -04:00
Ryan Ernst 6af4c43c4f Merge pull request #17128 from rjernst/maven_publish
Build: Switch to maven-publish plugin
2016-03-17 11:53:50 -07:00
Zachary Tong 1010e1e543 [TEST] Make test less fragile by sorting only on _uid
The previous method sorted first by _score, then _uid.  In certain situations, this allowed
floating point errors to slightly alter the sort order, causing test failure.

We only sort on _uid now, which should be deterministic and allow comparison of ten
documents.  Not quite as useful, but less fragile and we still check to make sure num hits
and max score are identical.

Closes #17164
2016-03-17 13:51:52 -04:00
Boaz Leskes 6ae738a2eb Debug log on testMergesHappening 2016-03-17 17:22:47 +01:00
Martijn van Groningen 7589ed7fbd Merge pull request #17167 from martijnvg/parent_id_query_take_child_type_into_account
parent_id query should take the child type into account too
2016-03-17 17:01:36 +01:00
Martijn van Groningen 68282dd9e9 parent/child: `parent_id` query should take the child type into account too.
If this query doesn't take the child type into account then it can match other
child document types pointing to the same parent type and that have the same id too.
2016-03-17 14:58:57 +01:00
Simon Willnauer e91a141233 Prevent index level setting from being configured on a node level
Today we allow to set all kinds of index level settings on the node level which
is error prone and difficult to get right in a consistent manner.
For instance if some analyzers are setup in a yaml config file some nodes might
not have these analyzers and then index creation fails.

Nevertheless, this change allows some selected settings to be specified on a node level
for instance:
 * `index.codec` which is used in a hot/cold node architecture and it's value is really per node or per index
 * `index.store.fs.fs_lock` which is also dependent on the filesystem a node uses

All other index level setting must be specified on the index level. For existing clusters the index must be closed
and all settings must be updated via the API on each of the indices.

Closes #16799
2016-03-17 14:42:18 +01:00
Tanguy Leroux 6441852618 Fix OOM in AbstractXContentParser
This commit fixes an OOM error that happens when the XContentParser.readList() method is asked to parse a single value instead of an array. It fixes the UpdateRequest parsing as well as remove some leniency in the readList() method so that it expect to be in an array before parsing values.

closes #15338
2016-03-17 14:37:33 +01:00
Colin Goodheart-Smithe d17fd335e4 fix range query rewrite so it rewrites correctly when shard min value == shard max value 2016-03-17 10:24:11 +00:00
Colin Goodheart-Smithe 30cdc11d75 Enable the indices request cache by default
Now we have 16870 we can enable the request cache by default. The caching can still be disabled on a per request basis and can still be disabled in the settings, only the default value has changed. For now this is done regardless of whether the shard is active or inactive.

Closes #17134
2016-03-17 09:06:32 +00:00
Colin Goodheart-Smithe 0f6b8dd848 Adds a rewrite phase to queries on the shard level
This change adds a rewrite phase to the queries on the shard before they are assessed for caching or executed. This allows the opportunity to rewrite queries as faster running simpler queries based on attributes known to only the shard itself. The first query to implement this is the RangeQueryBuilder which will rewrite to a MatchAllQueryBuilder if the range of terms on the shard is a subset of the query and rewrites to a MatchNoneQueryBuilder if the range of terms on the shard is completely outside the query.
2016-03-17 08:26:38 +00:00
Areek Zillur da24bfe542 simplify handling top-level suggest results 2016-03-17 00:34:19 -04:00
Areek Zillur 22e12ab7c3 cleanup request parsing in RestSearchAction 2016-03-16 19:03:30 -04:00
Areek Zillur 44b3dc95a0 remove irrelvant tests 2016-03-16 18:48:02 -04:00
Areek Zillur d1eba4baf2 fix tests 2016-03-16 18:48:02 -04:00
Areek Zillur 7aeeb52cf6 Standardize state format type for global and index level metadata
Currently, global and index level state format type can be configured through gateway.format.
This commit removes the ability to configure format type for these states.
Now we always store these states in SMILE format and ensure we always write them
to disk in the most compact way.
2016-03-16 18:48:02 -04:00
Simon Willnauer 0a12e7bb5b Revert "Added version 2.4.0 to Version"
This reverts commit 8c4aa75b0c.
2016-03-16 22:17:28 +01:00
Clinton Gormley 8c4aa75b0c Added version 2.4.0 to Version 2016-03-16 17:46:16 +01:00
Nik Everett 80f638b56a Support scheduled commands in current context
Adds support for scheduling commands to run at a later time on another
thread pool in the current thread's context:

```java
Runnable someCommand = () -> {System.err.println("Demo");};
someCommand = threadPool.getThreadContext().preserveContext(someCommand);
threadPool.schedule(timeValueMinutes(1), Names.GENERAL, someCommand);
```

This happens automatically for calls to `threadPool.execute` but `schedule`
and `scheduleWithFixedDelay` don't do that, presumably because scheduled
tasks are usually context-less. Rather than preserve the current context
on all scheduled tasks this just makes it possible to preserve it using
the syntax above.

To make this all go it moves the Runnables that wrap the commands from
EsThreadPoolExecutor into ThreadContext.

This, or something like it, is required to support reindex throttling.
2016-03-16 12:29:06 -04:00
Christoph Büscher 6ddf9ae92f Merge branch 'master' into feature-suggest-refactoring 2016-03-16 15:27:02 +01:00
Nik Everett 7197172047 [reindex] Properly register status
Without this commit fetching the status of a reindex from a node that isn't
coordinating the reindex will fail. This commit properly registers reindex's
status so this doesn't happen. To do so it moves all task status registration
into NetworkModule and creates a method to register other statuses which the
reindex plugin calls.
2016-03-16 07:40:49 -04:00
Christoph Büscher 39667b5793 Merge branch 'master' into feature-suggest-refactoring
Conflicts:
	docs/reference/migration/migrate_5_0/java.asciidoc
2016-03-16 12:06:42 +01:00
Christoph Büscher 79356c8a3b Query DSL: `constant_score` should throw error on more than one filter
When specifying more than one `filter` in a `constant_score`
query, the last one will be the only one that will be
executed, overwriting previous filters. It should rather
raise a ParseException to notify the user that only one
filter query is accepted.

Closes #17126
2016-03-16 10:59:48 +01:00
Christoph Büscher 43f71d1ff5 Merge pull request #17111 from cbuescher/fix-potential-parseBug-GeoDistanceSort
Fix a potential parsing problem in GeoDistanceSortParser.
For an input like `{ [...], "coerce" = true, "ignore_malformed" = false }` the parser will 
fail to parse the ignore_malformed boolean flag and will fall through to the last 
else-branch where the boolean flag will be parsed as geo-hash and `ignore_malformed`
treated as field name.
2016-03-16 10:17:08 +01:00
Simon Willnauer 302087d686 [TEST] Wait for ongoing merges in testRenewSyncFlush
Now that we also renew on forceMerge we might get a concurrent
flush while we are flushing on the test level
2016-03-16 09:37:50 +01:00
Ryan Ernst a90a2b34fc Build: Switch to maven-publish plugin
The build currently uses the old maven support in gradle. This commit
switches to use the newer maven-publish plugin. This will allow future
changes, for example, easily publishing to artifactory.

An additional part of this change makes publishing of build-tools part
of the normal publishing, instead of requiring a separate upload step
from within buildSrc. That also sets us up for a follow up to enable
precomit checks on the buildSrc code itself.
2016-03-15 19:16:37 -07:00
Jason Tedor 0f00c14afc Remove dead code in FTL#simpleMatchToFullName
This commit removes some dead code that resulted from removing the
ability for a field to have different names (after enforcing that fields
have the same full and index name).

Closes #17127
2016-03-15 22:11:48 -04:00
Jason Tedor 618441aea3 Merge pull request #17088 from jasontedor/simplify-bootstrap-settings
Bootstrap does not set system properties
2016-03-15 19:25:16 -04:00
Jason Tedor 4ee90db13d Remove path.home command-line setting 2016-03-15 16:29:29 -04:00
Yannick Welsch 7fb07a9a53 Merge pull request #17112 from ywelsch/enhance/forbid-sysout-for-tests
Forbid test sources to use System.out.println and Throwable.printStackTrace
2016-03-15 16:36:34 +01:00
Jason Tedor d1b85f69ef Shorter name for test class
This commit renames the ElasticsearchCommandLineParsingTests to
ElasticsearchCliTests.
2016-03-15 11:22:53 -04:00
Christoph Büscher 52852bdf39 Fix a potential parsing problem in GeoDistanceSortParser
Test revealed a potential problem in the current GeoDistanceSortParser.
For an input like `{ [...], "coerce" = true, "ignore_malformed" = false }
the parser will fail to parse the `ignore_malformed` boolean flag and
will fall through to the last else-branch where the boolean flag will be
parsed as geo-hash and `ignore_malformed` treated as field name.

Adding fix and test that will fail with the old parser code.
2016-03-15 15:41:54 +01:00
Yannick Welsch f5e6db4090 Remove System.out.println and Throwable.printStackTrace from tests 2016-03-15 15:40:37 +01:00
Jason Tedor 088dea8863 Fix javadoc comment on Elasticsearch#init
This commit fixes a stale javadoc comment on Elasticsearch#init; the
method is now visible for testing.
2016-03-15 09:35:58 -04:00
Jason Tedor fac0f990fc Rename "daemonize" to "foreground"
This commit renames the Bootstrap#init parameter "daemonize" to
"foreground" for clarity.
2016-03-15 09:31:33 -04:00
Simon Willnauer b4300da816 Merge pull request #17108 from s1monw/issues/17019
Try to renew sync ID if `flush=true` on forceMerge

Today we do a force flush which wipes the sync ID if there is one which
can cause the lost of all benefits of the sync ID ie. fast recovery.
This commit adds a check to renew the sync ID if possible. The flush call
is now also not forced since the IW will show pending changes if the forceMerge added new segments.
if we keep using force we will wipe the sync ID even if no renew was actually needed.

Closes #17019
2016-03-15 14:16:25 +01:00
Simon Willnauer 52c283cdee [TEST] Add test that ensures we never bump the minor version of lucene in a bugfix release 2016-03-15 14:15:41 +01:00
Simon Willnauer 2390eb5ed4 Add 2.2.1 to the version lookup table 2016-03-15 14:07:20 +01:00
Christoph Büscher 7ccf7adbdf Merge pull request #17074 from cbuescher/sort-serialization-scriptsort
Adding methods and tests to ScriptSortBuilder that makes it implement NamedWritable and adds a fromXContent() method needed to read itseld from xContent. Also changing sortMode() setters in 
FieldSortBuilder, GeoDistanceSortBuilder and ScriptSortBuilder to accept an enum instead of a String
value.

Relates to #15178
2016-03-15 13:59:10 +01:00
Clinton Gormley 0793f00cb9 Added version 2.2.1 and bwc indices for 2.2.1 2016-03-15 13:48:38 +01:00