Commit Graph

4598 Commits

Author SHA1 Message Date
Nik Everett 0539def016 Remove PROTOTYPE from MLT.Item
Relates to #17085
2016-04-01 22:01:20 -04:00
Nik Everett ca54b408a3 Remove PROTOTYPE from VersionType 2016-04-01 21:48:51 -04:00
Nik Everett b7afd80b3f Fix mistake in TopHits change 2016-04-01 21:35:35 -04:00
Nik Everett d919031469 Remove PROTOTYPEs from highlighting 2016-04-01 21:35:34 -04:00
Christoph Büscher 9d68a515b8 Merge pull request #17453 from cbuescher/add-xcontent-randomization
Add randomization of XContentBuilder output to query tests
2016-04-01 15:02:01 +02:00
Tanguy Leroux 662c34b888 Clean up some log messages 2016-04-01 14:44:50 +02:00
Boaz Leskes 283eff13aa Merge pull request #17457 from s1monw/make_translog_config_immutable
Make TranslogConfig immutable and pass TranslogGeneration as a ctor arg to Translog

This mutable state is confusing and is easily missed. By default this is null and
wipes all translog. This commit makes the TranslogGeneration mandatory on the Translog
constructor and removes the mutalbe state.
2016-04-01 12:18:28 +02:00
Boaz Leskes 0b12cab07a Cluster Health should run on applied states, even if waitFor=0 #17440
We already protect against making decisions based on an inflight cluster state if someone asks for a waitFor rule (like wait for green). We should do the same for normal health checks as well (unless timeout is set to 0) as it be trappy to debug failures when health says the cluster is in a certain state, but that state wasn't applied yet.

Closes #17440
2016-04-01 11:14:17 +02:00
Martijn van Groningen 9ebc0c8f47 ingest: make concrete processor impl final, like all other processor concrete impls. 2016-04-01 11:05:16 +02:00
Christoph Büscher 7a1b06ce0b Improve some test method comments. 2016-04-01 11:04:56 +02:00
Adrien Grand 4c4bbb3e45 Replace FieldStatsProvider with a method on MappedFieldType. #17334
FieldStatsProvider had to perform instanceof calls to properly handle dates or
ip addresses. By moving the logic to MappedFieldType, each field type can check
whether all values are within bounds its way.

Note that this commit only keeps rewriting support for dates, which are the only
field for which the rewriting mechanism is likely to help (because of time-based
indices).
2016-04-01 10:28:58 +02:00
Martijn van Groningen 11fdd2608f cleanup test 2016-04-01 09:45:28 +02:00
Adrien Grand 8afc0f1748 Remove MathUtils. #17454
It has a single method: mod, which can be replaced with Math.floorMod since
we always coll it with a positive divisor.
2016-04-01 08:31:31 +02:00
Christoph Büscher 1a697a1ae6 Addressing review comments 2016-03-31 21:46:17 +02:00
Simon Willnauer 7f8235b004 fix javadocs 2016-03-31 21:33:01 +02:00
Simon Willnauer 23ea59b06f Make TranslogConfig immutable and pass TranslogGeneration as a ctor arg to Translog
This mutable state is confusing and is easily missed. By default this is null and
wipes all translog. This commit makes the TranslogGeneration mandatory on the Translog
constructor and removes the mutalbe state.
2016-03-31 21:24:48 +02:00
Simon Willnauer baa2d51e59 Merge pull request #17422 from s1monw/recovery_mem_buffer_access
Move translog recover outside of the engine

We changed the way we manage engine memory buffers to an
open model where each shard can essentially has infinite memory.
The indexing memory controller is responsible for moving memory to disk
when it's needed. Yet, this doesn't work today when we recover from store/translog
since the engine is not fully initialized such that IMC has no access to the engine,
neither to it's memory buffer nor can it move data to disk.

The biggest issue here is that translog recovery happends inside the Engine constructor
which is problematic by itself since it might take minutes and uses a not yet fully
initialzied engine to perform write operations on.

This change detaches the translog recovery and makes it the responsibility of the caller
to run it once the engine is fully constructed or skip it if not necessary.
2016-03-31 21:03:00 +02:00
Simon Willnauer 6fb588156c Remove redundant commit - #openTranslog() already commits in that case 2016-03-31 20:46:28 +02:00
Nik Everett 75a9899813 Start to rework query registration
Changes QueryParser into a @FunctionalInterface and provides a way to
register queries using that. Cuts match and function_score queries over
to that registration method as a proof of concept.

Once all queries have been cut over we can remove their PROTOTYPES.
2016-03-31 13:43:07 -04:00
Christoph Büscher bbb6d91147 Add randomization of XContentBuilder output to query tests
Currently our testing of parsing query builders is limited to the
default order of the parameters that each builders toXContent()
method produces. To better test real queries where the order of
parameters can be different, this change adds a helper
method to ESTestCase that takes a XContentBuilder and randomly
shuffles the order of the fields inside an object. This is
used in AbstractQueryTestCase, but it can be used in other similar
places in the future.
2016-03-31 18:17:39 +02:00
Nik Everett c7780e6e0a Use ObjectParser in highlighting 2016-03-31 10:34:26 -04:00
Martijn Laarman 7de2377d38 Merge pull request #13906 from Mpdreamz/fix/remove-deprecated-get-alias-api
Remove deprecated indices.get_aliases
2016-03-31 15:57:03 +02:00
Simon Willnauer ea055d2ac9 add a comment why and when we can ignore skipTranslogRecovery in IndexShard 2016-03-31 15:54:21 +02:00
Simon Willnauer 4657796b24 fix test 2016-03-31 15:15:39 +02:00
Nik Everett 30a1862339 Remove PROTOTYPE from BulkItemResponse.Failure
Closes #17086
2016-03-31 09:10:36 -04:00
Nik Everett f8a67a2622 Remove PROTOTYPEs from ingest 2016-03-31 09:09:35 -04:00
Simon Willnauer f7cbc384f7 add tests to ensure translog ID is baked into commit on all open modes 2016-03-31 15:09:11 +02:00
Martijn Laarman dfe2c0ff0a Remove deprecated indices.get_aliases
This has been deprecated since the first release of Elasticsearch 1.0
2016-03-31 14:46:53 +02:00
Christoph Büscher 2843194635 Merge pull request #17441 from cbuescher/remove-RescoreParseElement
Remove RescoreParseElement after refactoring to RescoreBuilder.
2016-03-31 14:38:56 +02:00
Christoph Büscher 06184ee006 Remove RescoreParseElement
The refactoring of RescoreBuilder and QueryRescoreBuilder moved parsing
previously in RescoreParseElement into the builders. This removes the
left over parse element.
2016-03-31 14:37:21 +02:00
Simon Willnauer 0a277227c3 add back opem mode randomization 2016-03-31 13:06:23 +02:00
Simon Willnauer a356f74d4d Add test for IMC to ensure we also move buffers to disk during translog recovery 2016-03-31 12:58:00 +02:00
Simon Willnauer d006200c77 Make EngineConfig less mutable and ensure we prevent flushes during translog recovery phase. 2016-03-31 12:00:51 +02:00
Luca Cavanna 6b00b4b8dc Merge pull request #17410 from javanna/enhancement/discovery_node_one_getter
Remove duplicate getters from DiscoveryNode and DiscoveryNodes
2016-03-31 11:45:41 +02:00
Christoph Büscher c850b960fb Remove unused 'reverse' parse field from ScoreSortBuilder 2016-03-31 11:18:46 +02:00
javanna 32b6e529f4 Merge branch 'master' into enhancement/discovery_node_one_getter 2016-03-31 10:49:26 +02:00
Martijn van Groningen ccb009e45f percolator: Add scoring support to the percolator query
Percolator query documents are scored based on how well they match with the document being percolated.

Closes #13827
2016-03-31 10:08:43 +02:00
Martijn van Groningen 7600dc9943 percolator: Add support to extract terms from several types of span queries 2016-03-31 09:54:29 +02:00
Lee Hinman e266452cb2 Switch request parsing in ClusterAllocationExplainRequest to ObjectParser
Relates to #17305
2016-03-30 19:29:19 -06:00
Igor Motov e073b0c75d Add ability to group tasks by common parent
By default, tasks are grouped by node. However, task execution in elasticsearch can be quite complex and an individual task that runs on a coordinating node can have many subtasks running on other nodes in the cluster. This commit makes it possible to list task grouped by common parents instead of by node. When this option is enabled all subtask are grouped under the coordinating node task that started all subtasks in the group. To group tasks by common parents, use the following syntax:

 GET /tasks?group_by=parents
2016-03-30 17:50:27 -04:00
Simon Willnauer 1e06139584 Move translog recover outside of the engine
We changed the way we manage engine memory buffers to an
open model where each shard can essentially has infinite memory.
The indexing memory controller is responsible for moving memory to disk
when it's needed. Yet, this doesn't work today when we recover from store/translog
since the engine is not fully initialized such that IMC has no access to the engine,
neither to it's memory buffer nor can it move data to disk.

The biggest issue here is that translog recovery happends inside the Engine constructor
which is problematic by itself since it might take minutes and uses a not yet fully
initialzied engine to perform write operations on.

This change detaches the translog recovery and makes it the responsibility of the caller
to run it once the engine is fully constructed or skip it if not necessary.
2016-03-30 23:24:24 +02:00
Nik Everett 78ab6c5b7f [reindex] Dynamic throttle!
This allows the user to update the reindex throttle on the fly, with changes
that speed up the throttling being applied immediately and changes that
slow down the throttling being applied during the next batch. This means
that if a user throttles reindex in such a way that it tries to sleep for
16 years and then realizes that they've done something wrong then they
can change the throttle and reindex will wake up again. We don't apply
slow downs immediately so we never get in danger of losing the scan context.

Also, if reindex is canceled while it is sleeping (how it honor throttling)
then it'll immediately wake up and cancel itself.
2016-03-30 16:40:42 -04:00
Nik Everett 1ffb072df3 Replace static bwc data for new releases
The ones we had for 2.2.2 and 2.3.0 were broken.
2016-03-30 15:22:23 -04:00
Clinton Gormley bc998fd0c2 Added bwc indices for 2.2.2 and 2.3.0 2016-03-30 18:58:08 +02:00
javanna b9f9b2e3ee Merge branch 'master' into enhancement/discovery_node_one_getter 2016-03-30 17:22:40 +02:00
Simon Willnauer 97eaf6c04b Merge pull request #17414 from s1monw/issues/17412
Don't take recovery indexing into account on indexing stats

Closes #17412
2016-03-30 17:15:00 +02:00
Christoph Büscher f012b73947 Remove HighlighterParseElement
The old HighlightParseElement was only left because it was still
used in tests and some places in InnerHits. This PR removes it
and replaces the tests that checked that the original parse element
and the rafactored highlighter code produce the same output with
new tests that compare builder input to the SearchContextHighlight
that is created.
2016-03-30 16:59:49 +02:00
Adrien Grand d7179cafcc Add a soft limit on the number of shards that can be queried in a single search request. #17396
This commit adds the new `action.search.shard_count.limit` setting which
configures the maximum number of shards that can be queried in a single search
request. It has a default value of 1000.
2016-03-30 16:55:01 +02:00
Simon Willnauer dbcb9a29a5 Don't take recovery indexing into account on indexing stats
Closes #17412
2016-03-30 16:42:09 +02:00
Simon Willnauer e25ccb91ae [TEST] Make type inference simpler 2016-03-30 16:38:07 +02:00