3704 Commits

Author SHA1 Message Date
Christoph Büscher
9abf00b665 Add fromXContent method to SuggestBuilder 2016-02-09 17:47:56 +01:00
Christoph Büscher
2ae6420fd6 Suggest: Add parsing from xContent to PhraseSuggestionBuilder
For the ongoing search refactoring (#10217) the PhraseSuggestionBuilder
gets a way of parsing from xContent that will eventually replace the
current SuggestParseElement. This PR adds the fromXContent method
to the PhraseSuggestionBuilder and also adds parsing code for the
common suggestion parameters to SuggestionBuilder.

Also adding links from the Suggester implementations registeres in the
Suggesters registry to the corresponding prototype that is going to
be used for parsing once the refactoring is done and we switch from
parsing on shard to parsing on coordinating node.
2016-02-08 12:28:12 +01:00
Christoph Büscher
2dec129038 Merge branch 'master' into feature-suggest-refactoring 2016-02-08 09:47:06 +01:00
Simon Willnauer
7bfb1dfcc1 [TEST] Don't assert on null value. It's fine to not always see an exception in this part of the test. 2016-02-07 19:58:03 +01:00
Jason Tedor
16fe948a15 Objects#requireNonNull guard in MessageDigests 2016-02-07 11:20:53 -05:00
Jason Tedor
d0c03b26f6 Fix trace logging statement in ZenDiscovery 2016-02-06 09:17:49 -05:00
Jason Tedor
542373a779 Avoid cloning MessageDigest instances
This commit modifies the MessageDigests message digest provider to
return a thread local instance of MessageDigest instances instead of
using clone since some providers do not support clone.

Closes #16479
2016-02-06 09:10:31 -05:00
Simon Willnauer
b185209b63 Make IndicesWarmer a private class of IndexService
There is no need for IndicesWarmer to be a global accessible class. All it needs
access to is inside IndexService. It also doesn't need to be mutable once it's not a per node
instance. This commit move IndicesWarmer to IndexWarmer and makes the default impls like field data and
norms warming an impl detail. Also the IndexShard doesn't depend on this class anymore, instead it accepts
an Engine.Warmer as a ctor argument which delegates to the actual warmer from the index.
2016-02-05 15:24:17 +01:00
Simon Willnauer
778ec84a7c Merge pull request #16469 from s1monw/simplify_indices_field_data_cache
Simplify IndicesFieldDataCache and detach from guice
2016-02-05 14:24:19 +01:00
Simon Willnauer
9b2f40f627 Merge pull request #16471 from s1monw/no_sys_props_leaked
Apply system properties after all arguemnts are parsed in BootstrapCLIParser
2016-02-05 14:23:00 +01:00
Christoph Büscher
97172aa2fd Merge pull request #16465 from cbuescher/issue-13884-test
Tests: Add test for minimum_should_match for SimpleQueryStringQuery
2016-02-05 13:12:53 +01:00
Christoph Büscher
d885fe62ea Add test for minimum_should_match, one term and multiple fields
This adds a test case similar to the issue in #13884 which was
fixed in #16155.
2016-02-05 12:33:13 +01:00
Andrej Kazakov
7f2b369dfd Use Accept header field in cat API
The cat API previously used the Content-Type header field for
determining the media type of the response. This is in opposition to the
HTTP spec which specifies the Accept header field for this purpose. This
commit replaces the use of the Content-Type header field with the Accept
header field in the cat API.

Closes #14421
2016-02-05 06:28:39 -05:00
Simon Willnauer
1e18c9a7b6 Apply system properties after all arguemnts are parsed in BootstrapCLIParser
One of our tests leaked a system property here since we failed after appling some
system properties in BootstrapCLIParser. This is not a huge deal in production since
we exit the JVM if we fail on that. Yet for correctnes we should only apply them if
we manage to parse them all.
This also caused a test failure lately on CI but on an unrelated test:
  https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+periodic/314/console
2016-02-05 11:21:00 +01:00
Simon Willnauer
b5ef48ce57 fix more tests 2016-02-05 10:36:02 +01:00
Simon Willnauer
9d07501c96 fix test 2016-02-05 09:54:55 +01:00
Simon Willnauer
00be9e58f2 Simplify IndicesFieldDataCache and detach from guice
Indices level field data cacheing belongs into IndicesService and doesn't need to be
wired by guice. This commit also moves the async cache refresh out of the class into
IndicesService such that threadpool dependencies are removed and testing / creation becomes
simpler.
2016-02-05 09:43:33 +01:00
Christoph Büscher
b108cb84bc Comply with new 140 column per line checkstyle 2016-02-05 00:23:27 +01:00
Christoph Büscher
225adcfaeb Merge branch 'master' into feature-suggest-refactoring 2016-02-04 23:50:57 +01:00
Martijn van Groningen
7a6adfd93a ingest: Added foreach processor.
This processor is useful when all elements of a json array need to be processed in the same way.
This avoids that a processor needs to be defined for each element in an array.
Also it is very likely that it is unknown how many elements are inside an json array.
2016-02-04 23:44:01 +01:00
Simon Willnauer
59a20015d6 Make TermVectorService static 2016-02-04 17:17:16 +01:00
Simon Willnauer
75802515ea Merge branch 'master' into detach_shard_from_term_vectors 2016-02-04 17:12:09 +01:00
Simon Willnauer
450ee70038 Remove DFS support from TermVector API
Retrieving distributed DF for TermVectors is beside it's esotheric justification
a very slow process and can cause serious load on the cluster. We also don't have nearly
enough testing for this stuff and given the complexity we should remove it rather than carrying it
around.
2016-02-04 16:20:24 +01:00
Yannick Welsch
15507580bb Merge pull request #16243 from ywelsch/fix/remove-shardrouting-version
Remove obsolete version in ShardRouting
2016-02-04 15:52:00 +01:00
Yannick Welsch
4937531a17 Remove obsolete version in ShardRouting
Closes #16243
2016-02-04 15:50:25 +01:00
Boaz Leskes
4cdab159f1 Remove plugability of the gateway
In the spirit of simplification, remove the ability to have a custom gateway. We haven't seen any valid use for it so far.

closes #16448
2016-02-04 15:45:05 +01:00
Boaz Leskes
924e880480 Remove gateway.initial_meta and always rely on min master nodes
During initial cluster forming, when  a master is elected, it reaches out to all other masters nodes and ask the last cluster state they persisted. To make sure we select the right state, we must successfully read from a `min_master_nodes` nodes. The gateway currently have specific settings to override this behavior, but I don't think they are ever used. We can drop them and reach out to the discovery layer, the single source of truth for the min master nodes settings.

Closes #16446
2016-02-04 13:42:28 +01:00
Simon Willnauer
30f569f958 Remove dependency from IndexShard on TermVectorService
This dependency is just syntactic sugar and complicates IndexShard creation.
This commit move it out where it's actually used and needed.
2016-02-04 12:55:45 +01:00
Simon Willnauer
e69350f2ba Fix method visibility in SettingsModule.java 2016-02-04 11:53:06 +01:00
Simon Willnauer
cb811a85da Add javadocs for SettingsModule 2016-02-04 11:49:59 +01:00
Simon Willnauer
e19833171b Add more javadocs to Setting.java 2016-02-04 11:44:36 +01:00
Simon Willnauer
c416b23739 Merge pull request #16445 from s1monw/filter_settings_on_node_info
Add settings filtering to node info requests
2016-02-04 11:26:04 +01:00
Simon Willnauer
26a0c72323 add test fore node info settings filtering 2016-02-04 11:15:29 +01:00
Ryan Ernst
5c0f09b03a Merge pull request #16443 from rjernst/cli_terminal
CliTool: Cleanup and document Terminal
2016-02-04 02:05:28 -08:00
Ryan Ernst
e97345984d Remove format args from readText and readSecret 2016-02-04 02:03:17 -08:00
Christoph Büscher
c0006426a7 Merge branch 'master' into feature-suggest-refactoring 2016-02-04 11:01:24 +01:00
Simon Willnauer
ca1a12e4c3 Add settings filtering to node info requests
Today we don't filter settings in NodeInfo so transport clients get unfiltered settings.
2016-02-04 10:45:32 +01:00
Simon Willnauer
cc520b20e1 Merge branch 'master' into fix_settings_filter 2016-02-04 09:28:41 +01:00
Ryan Ernst
b80200a363 CliTool: Cleanup and document Terminal
This change documents the Terminal abstraction that cli tools use, as
well as simplifies the api to be a minimal set of methods to interact
with a terminal.
2016-02-03 22:22:56 -08:00
Ryan Ernst
b0ed528be8 Plugin cli: Delete temp zip file once it is unzipped 2016-02-03 20:17:42 -08:00
Nik Everett
a2f07679fd Add task status
Implements a simple task status for superclasses of ReplicationRequest to
show how you can do use the status.
2016-02-03 18:21:42 -05:00
Simon Willnauer
e1cf5e745d some plugins share settings - make it easy to filter them 2016-02-03 21:50:06 +01:00
Simon Willnauer
686627be5a Move ModuleTestCase into framework 2016-02-03 21:04:44 +01:00
Ali Beyad
592f5499cd More robust handling of CORS HTTP Access Control
Uses a refactored version of Netty's CORS implementation to provide more
robust cross-origin resource request functionality.  The CORS specific
Elasticsearch parameters remain the same, just the underlying
implementation has changed.

It has also been refactored in a way that allows dropping in Netty's
CORS handler as a replacement once Elasticsearch is upgraded to Netty 4.
2016-02-03 14:50:20 -05:00
Simon Willnauer
e02d2e004e Rewrite SettingsFilter to be immutable
This change rewrites the entire settings filtering mechanism to be immutable.
All filters must be registered up-front in the SettingsModule. Filters that are comma-sparated are
not allowed anymore and check on registration.
This commit also adds settings filtering to the default settings recently added to ensure we don't render
filtered settings.
2016-02-03 20:05:55 +01:00
Ali Beyad
245022f95b Fixed JSON parsing for the Term Suggester
Ensures that the clients' serialization of the sort and string edit
distance enumeration values as upper case are correctly normalized
when parsing the incoming JSON.
2016-02-03 13:22:39 -05:00
Ali Beyad
882cd5c6ee Refactored the term suggestion builder for the query refactoring effort
Added the term suggestion builder's serialization/deserialization and
equals/hashCode methods.
2016-02-03 12:00:03 -05:00
Nik Everett
5e98094db1 Remove long lines from ElasticsearchException
Mostly just wrapping the exception list.

Also:
* Reworks the docs on ElasticsearchExceptionHandle
* Removes long lines from ExceptionSerializationTests
 * Switches one method from arrow shaped to early returns
 * Adds line breaks
2016-02-03 09:33:02 -05:00
Martijn van Groningen
0d9f535044 ingest: seal all processor and processor factory implementations 2016-02-03 14:53:11 +01:00
Isabel Drost-Fromm
7d787ad1d1 Merge pull request #16411 from MaineC/test-fix/geo-sort-messy
Move non-groovy geo tests from messy tests to core
2016-02-03 14:52:01 +01:00