Commit Graph

23110 Commits

Author SHA1 Message Date
Martijn van Groningen d3cd58eb2f Merges PR #18957
This commit fixes several NPEs caused by implicitly performing a get request for a document that exists with its _source disabled and then trying to access the source. Instead of causing an NPE the following queries will throw an exception with a "source disabled" message (similar behavior as if the document does not exist).:
- GeoShape query for pre-indexed shape (throws IllegalArgumentException)
- Percolate query for an existing document (throws IllegalArgumentException)

A Terms query with a lookup will ignore the document if the source does not exist (same as if the document does not exist).

GET and HEAD requests for the document _source will return a 404 if the source is disabled (even if the document exists).
2016-06-27 09:37:28 +02:00
Martijn van Groningen ba90508b91 fix checkstyle issue 2016-06-27 09:00:13 +02:00
Martijn van Groningen 9a0ce62550 percolator: Add support for the synonym query. 2016-06-27 07:42:44 +02:00
David Pilato bfb19676a6 Merge pull request #19080 from damienalexandre/patch-4
Rename plainless into painless in migration doc
2016-06-26 17:44:09 +02:00
Damien Alexandre fec4a18835 Rename plainless into painless in migration doc
The scripting language was wrongly named.
2016-06-26 17:41:34 +02:00
Nik Everett 71b95fb63c Switch analysis from push to pull
Instead of plugins calling `registerTokenizer` to extend the analyzer
they now instead have to implement `AnalysisPlugin` and override
`getTokenizer`. This lines up extending plugins in with extending
scripts. This allows `AnalysisModule` to construct the `AnalysisRegistry`
immediately as part of its constructor which makes testing anslysis
much simpler.

This also moves the default analysis configuration into `AnalysisModule`
which is how search is setup.

Like `ScriptModule`, `AnalysisModule` no longer extends `AbstractModule`.
Instead it is only responsible for building `AnslysisRegistry`. We still
bind `AnalysisRegistry` but we only do so in `Node`. This is means it
is available at module construction time so we slowly remove the need to
bind it in guice.
2016-06-26 07:15:42 -04:00
Jason Tedor c79e27180e Require timeout units when parsing query body
Today when parsing the timeout field in a query body, if time units are
supplied the parser throws a NumberFormatException. Addtionally, the
parsing allows the timeout field to not specify units (it assumes
milliseconds). This commit fixes this behavior by not only allowing time
units to be specified but requires time units to be specified. This is
consistent with the documented behavior and the behavior in 2.x.

Relates #19077
2016-06-25 16:18:25 -04:00
Simon Willnauer 09c0285d9c [TEST] Add unittest for settings update validation 2016-06-25 21:23:41 +02:00
Alex Benusovich 3ca909dfea Fix NPEs due to disabled source
This commit fixes several NPEs caused by implicitly performing a get request for a document that exists with its _source disabled and then trying to access the source. Instead of causing an NPE the following queries will throw an exception with a "source disabled" message (similar behavior as if the document does not exist).:
- GeoShape query for pre-indexed shape (throws IllegalArgumentException)
- Percolate query for an existing document (throws IllegalArgumentException)

A Terms query with a lookup will ignore the document if the source does not exist (same as if the document does not exist).

GET and HEAD requests for the document _source will return a 404 if the source is disabled (even if the document exists).
2016-06-24 22:03:03 -07:00
Jason Tedor 7c87d39f0c Revert slow tests heartbeat
This commit reverts the slow tests heartbeat added in
b6fbd18e09. The heartbeat has not served
its stated purpose of drawing attention to slow tests, and the heartbeat
can kill builds with SELinux enforcing enabled. While the heartbeats can
be disabled via the environment variable PULSE_SERVER, and SELinux
policy files can be changed, since the heartbeats are not accomplishing
their intended purpose they should be removed.

Relates #19071
2016-06-24 14:32:45 -04:00
Ryan Ernst 6995bde710 Merge branch 'master' into mapper_plugin_api 2016-06-24 11:15:06 -07:00
Robert Muir 0b2baa7f63 Merge pull request #19065 from rmuir/help_painless_docs
Bring painless docs closer to reality
2016-06-24 12:52:30 -04:00
Robert Muir e6819648cc fix the primitive case of instanceof 2016-06-24 12:44:57 -04:00
Martijn van Groningen 2a196d4068 docs: update example for finding percolator where query terms couldn't be extracted successfully 2016-06-24 18:18:02 +02:00
Robert Muir 001a060c84 Bring painless docs closer to reality 2016-06-24 12:06:41 -04:00
Martijn van Groningen 599a548998 percolator: Don't verify candidate matches with MemoryIndex that are verified matches
If we don't care about scoring then for certain candidate matches we can be certain, that if they are a candidate match,
then they will always match. So verifying these queries with the MemoryIndex can be skipped.
2016-06-24 15:46:55 +02:00
Christoph Büscher 6d5b4a78fe Make parsing of bool queries stricter
Currently we don't throw an error when there is more than one query clause
specified in a must/must_not/should/filter object of the bool query without
using array notation, e.g.:
 { "bool" : { "must" : { "match" : { ... }, "match": { ... }}}}

In these cases, only the first query will be parsed and further behaviour is
unspecified, possibly leading to silently ignoring the rest of the query.
Instead we should throw a ParsingException if we don't encounter an END_OBJECT
token after having parsed the query clause.
2016-06-24 11:49:28 +02:00
David Pilato 4ad5da2c11 Merge remote-tracking branch 'origin/master' 2016-06-24 11:12:01 +02:00
Adrien Grand fbad3af352 Add a how-to section to the docs. #18998
This moves the "Performance Considerations for Elasticsearch Indexing" blog post
to the reference guide and adds similar recommendations for tuning disk usage
and search speed.
2016-06-24 10:58:33 +02:00
David Pilato d73194b9b7 Remove settings filtering for service_account in GCS repository
Related to #18945 and to this 35d3bdab84 (commitcomment-17914150)

In GCS Repository plugin we defined a `service_account` setting which is defined as `Property.Filtered`.
It's not needed as it's only a path to a file.

Closes #18946
2016-06-24 10:58:29 +02:00
Simon Willnauer 148e64d654 [TEST] Port testcase from #19035 to master 2016-06-23 22:53:54 +02:00
Areek Zillur c49ec957eb Merge pull request #19048 from karmi/fix_rollover_integration_test
Fixed incorrect indentation in the YAML integration test for the "Rollover" API
2016-06-23 12:57:16 -04:00
Areek Zillur e2e938c9d2 Merge pull request #19050 from areek/fix/rollover_rest_api_spec
Remove extra brace from rollover rest api spec
2016-06-23 12:46:48 -04:00
Areek Zillur ca322a12fc remove extra brace from rollover rest api spec 2016-06-23 12:37:04 -04:00
Karel Minarik ae8f885ef9 Fixed incorrect indentation in the YAML integration test for the "Rollover" API 2016-06-23 18:13:52 +02:00
Lee Hinman 9a3227108b [TEST] Add ensureGreen for IpRangeIT
Resolves #18584
2016-06-23 09:58:10 -06:00
Yannick Welsch ca6fa9ef19 Fix block checks when no indices are specified (#19047)
Global cluster blocks were not checked if an empty set of indices were passed as argument to the block checking method. This would lead to issues where some operations are already executed on a cluster before it has recovered its cluster state.
2016-06-23 17:52:09 +02:00
Jason Tedor d6ddce2be8 Update SHA for JNA dependency
This commit updates the SHA for the JNA dependency. The JNA dependency
was upgraded from version 4.1.0 to version 4.2.2 in commit
7f10174362 but the SHA was not updated.
2016-06-23 11:43:18 -04:00
Martijn van Groningen 0cae9ad30e docs: removed obsolete information, percolator queries are not longer loaded into jvm heap memory. 2016-06-23 15:32:26 +02:00
Jason Tedor 7f10174362 Upgrade JNA to 4.2.2 and remove optionality
This commit upgrades JNA from version 4.1.0 to 4.2.2. Additionally, this
dependency is now non-optional as JNA is dual-licensed with Apache
License 2.0 since JNA 4.0.0.

Relates #19045
2016-06-23 09:21:40 -04:00
Yannick Welsch a5908a5da5 [TEST] Increase timeouts for Rest test client (#19042)
Some Rest / Doc tests were running into the default socket timeout of 10 seconds.
2016-06-23 14:05:56 +02:00
Robert Muir f35cd0e30a Merge pull request #19022 from rmuir/loopCounter
Fix disabled loop counter
2016-06-23 07:45:06 -04:00
Clinton Gormley 5a08e36f9c Update migrate_5_0.asciidoc
Updated breaking changes to state that upgraded indices still need to be reindexed,
and to mention the migration plugin
2016-06-23 13:10:50 +02:00
Yannick Welsch 33313df0a2 Add ThreadLeakLingering option to Rest client tests
Some Rest tests use the Sun HTTP server which has lingering threads after shutdown. Similar to ESTestCase, this adds an
option to wait 5 seconds for these threads to terminate.
2016-06-23 10:21:37 +02:00
Adrien Grand 7ba5bceebe Add a MultiTermAwareComponent marker interface to analysis factories. #19028
This is the same as what Lucene does for its analysis factories, and we hawe
tests that make sure that the elasticsearch factories are in sync with
Lucene's. This is a first step to move forward on #9978 and #18064.
2016-06-23 10:19:24 +02:00
Adrien Grand 6c8744ecb5 Attempt at fixing IndexStatsIT.testFilterCacheStats.
I suspect recent failures are due to the fact that the cache disables itself
when there is contention. This runs assertions in an assertBusy block since
they should eventually succeed.
2016-06-23 10:16:04 +02:00
Adrien Grand c87ba0bfa8 Fix docs build. 2016-06-23 09:44:33 +02:00
Tanguy Leroux 04da1bda0d Move templates out of the Search API, into lang-mustache module
This commit moves template support out of the Search API to its own dedicated Search Template API in the lang-mustache module. It provides a new SearchTemplateAction that can be used to render templates before it gets delegated to the usual Search API. The current REST endpoint are identical, but the Render Search Template endpoint now uses the same Search Template API with a new "simulate" option. When this option is enabled, the Search Template API only renders template and returns immediatly, without executing the search.

Closes #17906
2016-06-23 09:30:53 +02:00
Boaz Leskes 4be94cdc95 revert - Inline reroute with process of node join/master election (#18938)
There are secondary issues with async shard fetch going out to nodes before they have a cluster state published to them that need to be solved first. For example:
- async fetch uses transport node action that resolves nodes based on the cluster state (but it's not yet exposed by ClusterService since we inline the reroute)
- after disruption nodes will respond with an allocated shard (they didn't clean up their shards yet) which throws of decisions master side.
- nodes deed the index meta data in question but they may not have if they didn't recieve the latest CS
2016-06-23 08:41:44 +02:00
David Pilato 157645fe9e Merge pull request #18981 from elastic/doc/ingest-foreach
Wrong name for values field
2016-06-22 23:14:02 +02:00
Michael McCandless 14025aaef8 Merge pull request #18914 from mikemccand/node_info_indexing_buffer
Add total_indexing_buffer/_in_bytes to nodes info API
2016-06-22 17:13:35 -04:00
Mike McCandless d3d524568e merge master 2016-06-22 16:23:56 -04:00
Nik Everett 6dd9cd72b9 Build valid slices in SearchSourceBuilderTests
The test had a 1 in 500 chance of building and invalid slice.
2016-06-22 14:56:42 -04:00
Nik Everett ee2a77143b Docs: Convert aggs/misc to CONSOLE
They should be more readable and tested during the build.
2016-06-22 14:52:06 -04:00
Nik Everett 02761f5fe0 Docs: migration notes for _timestamp and _ttl
We aren't able to actually create an index with _timestamp enabled
to test the migration, or, at least, we won't be able to after #18980
is re-merged. But the docs are still ok.

Closes #19007
2016-06-22 14:43:12 -04:00
Nik Everett 0bf447c697 Group client projects under :client
:client ---------> :client:rest
:client-sniffer -> :client:sniffer
:client-test ----> :client:test

This lines the client up with how we do things like modules and
plugins.
2016-06-22 14:26:41 -04:00
Luca Cavanna 4ac1d26916 Merge pull request #19030 from javanna/test/client-test
[TEST] Add client-test module and make client tests use randomized runner directly
2016-06-22 19:38:10 +02:00
javanna c2839c1577 [TEST] Add client-test module and make client tests use randomized runner directly
The lucene-test dependency caused issues with IDEs as they would always load the lucene 5 jar although they shouldn't have, which caused jarhell in es core tests.

If we depend directly on randomized runner we don't have this problem. It is luckily still compatible with java 1.7. This requires though adding a thin module that includes the base test class which can be shared between client and client-sniffer.
2016-06-22 19:37:08 +02:00
Jason Tedor 5e960c0d03 Move upgrade test to upgrade from version 2.3.3
This commit moves the upgrade test to test upgrading from version 2.3.3
instead of from version 2.0.0.

Relates #19029
2016-06-22 13:27:19 -04:00
Nik Everett 6671c0cf09 Tasks: Add completed to the mapping 2016-06-22 12:34:59 -04:00