Commit Graph

21364 Commits

Author SHA1 Message Date
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
Nik Everett 14d37baa4b [reindex] Don't get rejected
BulkByScrollTaskTest#testDelayAndRethrottle was getting rejected exceptions
every once in a while. This was reproducible ~20% of the time for me. I
added a CyclicBarrier to prevent the test from shutting down the thread pool
before the threads get finished.
2016-03-31 14:50:14 -04: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
Joe Hillenbrand f355bb2a9b Merge pull request #17431 from joehillen/issue/17430
Set MAX_OPEN_FILES to 65536
2016-03-31 10:33:40 -07:00
Nik Everett 0c762fca35 Fix test mistake 2016-03-31 12:27:35 -04:00
Nik Everett 3caa5a929a Documentation for scroll size in reindex 2016-03-31 12:21:32 -04:00
Nik Everett 7f794e7b77 Test for invalid scroll_size 2016-03-31 12:21:32 -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
javanna 0ea6dba04b [DOCS] Update _cat/nodes docs after recent changes 2016-03-31 16:36:29 +02:00
Nik Everett c7780e6e0a Use ObjectParser in highlighting 2016-03-31 10:34:26 -04:00
Daniel Mitterdorfer 6f0581c67c Update version and major-version variable in reference docs
Checked with @clintongormley
2016-03-31 16:17:46 +02: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
Daniel Mitterdorfer b7b65b93d1 Merge remote-tracking branch 'danielmitterdorfer/update-cluster-stats-docs' 2016-03-31 14:56:07 +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
Daniel Mitterdorfer 930ce1bfec Add up-to-date example of cluster stats API output 2016-03-31 14:41:37 +02:00
Martijn van Groningen 91fc9daeda Merge pull request #17443 from martijnvg/reindex_small_doc_fixed
Fix small reindex doc issues
2016-03-31 14:40:16 +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
Clinton Gormley 637da86e5f Docs: Updated the upgrade API docs to explain that the reindex API should be used instead 2016-03-31 14:34:31 +02:00
Simon Willnauer 0a277227c3 add back opem mode randomization 2016-03-31 13:06:23 +02:00
Martijn van Groningen 6bcfc730d7 reindex: fix small documentation issues 2016-03-31 12:59:12 +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
Clinton Gormley 18c5ea8599 Update templates.asciidoc
Relates to #17375
2016-03-31 11:15:57 +02:00
javanna 32b6e529f4 Merge branch 'master' into enhancement/discovery_node_one_getter 2016-03-31 10:49:26 +02:00
Adrien Grand 51d9574916 Fix reference guide about the default value of min_should_match. 2016-03-31 10:49:02 +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
Adrien Grand 26a0fb37a4 Add examples of useful dynamic templates to the docs. #17413 2016-03-31 09:45:11 +02:00
Lee Hinman 0b1b366fe8 Merge remote-tracking branch 'dakrone/switch-explain-to-objectparser' 2016-03-30 19:32:09 -06:00
Lee Hinman e266452cb2 Switch request parsing in ClusterAllocationExplainRequest to ObjectParser
Relates to #17305
2016-03-30 19:29:19 -06:00
Joe Hillenbrand 81b6326891 Set MAX_OPEN_FILES to 65536
Relates to #17430
2016-03-30 16:44:37 -07:00
Jack Conradson a37e53c50f Painless clean up including fixing _score issues and improving type
error messages.

Closes #17428
2016-03-30 16:40:17 -07: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