Commit Graph

6777 Commits

Author SHA1 Message Date
Colin Goodheart-Smithe 31f26ec115 review comment fixes 2015-04-27 17:10:03 +01:00
Simon Willnauer d164526d27 Remove `_shutdown` API
Thsi commit removes the `_shutdown` API entirely without any replacement.
Nodes should be managed from the operating system not via REST APIs
2015-04-27 17:19:36 +02:00
Adrien Grand 2f777e4736 Release: Add bw indices for 1.4.5 and 1.5.2. 2015-04-27 13:56:02 +02:00
Alexander Reelsen 467b4f6e2d Versioning: Added recent 1.4 and 1.5 releases 2015-04-27 12:57:47 +02:00
markharwood 1b8b993912 Query enhancement: Enable Lucene ranking behaviour for queries on numeric fields.
This changes the default ranking behaviour of single-term queries on numeric fields to use the usual Lucene TermQuery scoring logic rather than a constant-scoring wrapper.

Closes #10628
2015-04-27 09:42:55 +01:00
Adrien Grand d7d39e1938 Reduce code duplication in TransportIndexAction/TransportShardBulkAction.
We have some duplication in TransportIndexAction/TransportShardBulkAction due
to the fact that we have totally different branches for INDEX and CREATE
operations. This commit tries to share the logic better between these two cases.
2015-04-27 10:23:11 +02:00
Adrien Grand 8d30c9a392 Tests: Mark the entire RiverTests suite as AwaitsFix. 2015-04-27 09:27:17 +02:00
Simon Willnauer 061a010453 Revert "Add support for cluster state diffs"
This reverts commit d746e14cf3.
2015-04-27 09:07:02 +02:00
Alexander Reelsen 5d8e9e24c9 HTTP: Ensure url path expansion only works inside of plugins
This prevents reading of files that are not part of the plugin
directory by specifically crafted paths.
2015-04-27 07:47:14 +02:00
Jun Ohtani 9745808c3f Settings: validate number_of_shards/number_of_replicas without index setting prefix
Move the validation logic to MetaDataCreateIndexService
Add ShardClusterSnapshotRestoreTests
Add the validation to RestoreService

Closes #10693
2015-04-27 12:34:32 +09:00
Igor Motov d746e14cf3 Add support for cluster state diffs
Adds support for calculating and sending diffs instead of full cluster state of the most frequently changing elements - cluster state, meta data and routing table.

Closes #6295
2015-04-26 22:36:39 -04:00
Alexander Reelsen 91e2bb193c TransportClient: Ensure netty I/O thread is not blocked
Whenever a transport client executes a request, it uses a built-in
RetryListener which tries to execute the request on another node.

However, if a connection error occurs, the onFailure() callback of
the listener is triggered, the netty I/O thread might still be used
to whatever failure has been added.

This commit offloads the onFailure handling to the generic thread pool.
2015-04-26 21:31:36 +02:00
Simon Willnauer fe331b57b7 [TEST] Don't use extraFS files as legacy files in tests 2015-04-26 21:08:57 +02:00
Simon Willnauer 2c510f0689 Allow double-closing of FSTranslog
the translog might be reused across engines which is currently a problem
in the design such that we have to allow calls to `close` more than once.
This moves the closed check for snapshot on the actual file to exit the loop.

Relates to #10807
2015-04-26 15:13:06 +02:00
Simon Willnauer f87fb95830 [TEST] fail if exception is not thrown 2015-04-26 14:26:22 +02:00
Simon Willnauer 2373c2b43c [TRANSLOG] Fail #snapshot if translog is closed
If the translog is closed while a snapshot opertion is in progress
we must fail the snapshot operation otherwise we end up in an endless
loop.

Closes #10807
2015-04-26 14:03:50 +02:00
Simon Willnauer 768e1c2012 [TEST] Fix test to take care of refresh failures after successful commit 2015-04-26 13:44:29 +02:00
Tanguy Leroux f7d4baacfb Remove working directory
This commit removes the working directory and its associated environment variable "WORK_DIR"
2015-04-25 13:08:36 +02:00
Zachary Tong 26189ee2e6 Rename helpers to follow naming conventions 2015-04-24 22:38:43 -04:00
Ryan Ernst 1db380cf49 Merge pull request #10798 from mfussenegger/bigarrays
Internal: Change BigArrays to not extend AbstractComponent

In order to avoid the getLogger(getClass()) calls in the
AbstractComponent constructor.

Seems like BigArrays used to be a Singleton but it actually
no longer is one. Every time a SearchContext is created a
new BigArrays instance is created via the
withCircuitBreaking call.

closes #10798
2015-04-24 15:07:16 -07:00
Mathias Fussenegger 9f20c1c642 change BigArrays to not extend AbstractComponent
In order to avoid the ``getLogger(getClass())`` calls in the
AbstractComponent constructor.

Seems like BigArrays used to be a Singleton but it actually
no longer is one. Every time a SearchContext is created a
new BigArrays instance is created via the
``withCircuitBreaking`` call.
2015-04-24 22:34:32 +02:00
Adrien Grand 46ac32ad4a Merge pull request #10786 from jpountz/fix/dynamic_mappings_on_replicas
Internal: Wait for required mappings to be available on the replica before indexing.
2015-04-24 22:20:50 +02:00
Adrien Grand 3e5b8a21b4 Internal: Wait for required mappings to be available on the replica before indexing.
Due to timing issues, mappings that are required to index a document might not
be available on the replica at indexing time. In that case the replica starts
listening to cluster state changes and re-parses the document until no dynamic
mappings updates are generated.
2015-04-24 22:00:06 +02:00
Ryan Ernst f27f5aaa22 Upgrade to lucene-5.2-snapshot-1675927 2015-04-24 12:38:32 -07:00
Boaz Leskes 389ce39919 CommitStats doesn't need to allow for null values in commit user data
Lucene forbids writing those and MapBuilder.immutableMap doesn't like them either, as discovered by @brwe

Closes #10774
2015-04-24 20:57:09 +02:00
Ryan Ernst 4d672b0369 Mappings: Join MergeResults with MergeContext since they are almost the same
MergeContext currently exists to store conflicts, and providing
a mechanism to add dynamic fields. MergeResults store the same
conflicts. This change merges the two classes together, as well
as removes the MergeFlags construct.

This is in preparation for simplifying the callback structures
to dynamically add fields, which will require storing the mapping
updates in the results, instead of having a sneaky callback to
the DocumentMapper instance. It also just makes more sense that
the "results" of a merge are conflicts that occurred, along with
updates that may have occurred. For MergeFlags, any future needs
for parameterizing the merge (which seems unlikely) can just be
added directly to the MergeResults as simlulate is with this change.
2015-04-24 08:19:46 -07:00
Robert Muir a3d03fdeb8 style changes to Bootstrap 2015-04-24 10:09:30 -04:00
Robert Muir fca05edbd4 add constant only used once to make it harder to read the code 2015-04-24 09:51:01 -04:00
Robert Muir 2d778df4b4 Merge branch 'master' into put_me_in_coach 2015-04-24 09:45:19 -04:00
Shay Banon 209b8cf952 TEST: assert we can create an instance of request 2015-04-24 15:04:25 +02:00
Shay Banon 8dbb79c96a refactor and cleanup transport request handling
This refactoring and cleanup is that each request handler ends up
implementing too many methods that can be provided when the request handler itself
is registered, including a prototype like class that can be used to instantiate
new request instances for streaming.
closes #10730
2015-04-24 14:11:43 +02:00
Simon Willnauer cb615ffecf [TEST] Don't use pretty print in tests Windowns has slight differences 2015-04-24 13:18:35 +02:00
Simon Willnauer c25ca1ebfb [CORE] Simplify IndexStore and friends
Today we have a lot of bloat in the IndexStore and related classes. THe IndexStore interface
is unneeded as we always subclass AbstractIndexStore and it hides circular dependencies
that are problematic when added. Guice proxies them if you have an interface which is bad in
general. This commit removes most of the bloat classes and unifies all the classes we have
into a single one since they all just structural and don't encode any functionality.
2015-04-24 13:10:36 +02:00
Boaz Leskes 5bdfdc42d9 Refactor TransportShardReplicationOperationAction
Refactor TransportShardReplicationOperationAction state management into clear separate Primary phase and Replication phase. The primary phase is responsible for routing the request to the node holding the primary, validating it and performing the operation on the primary. The Replication phase is responsible for sending the request to the replicas and managing their responses.

This also adds unit test infrastructure for this class, and some basic tests. We can extend later as we continue developing.

Closes #10749
2015-04-24 12:39:35 +02:00
Martijn van Groningen b444d2c31a Test: wait for green 2015-04-24 12:06:18 +02:00
Simon Willnauer 3ff0b21c21 Remove dead code 2015-04-24 10:37:55 +02:00
Simon Willnauer 84549f334d [TEST] use toString rather than getDetailedMessage() 2015-04-24 10:09:24 +02:00
Martijn van Groningen dd4a22bfed bulk: Fields defined in the `_default_` mapping of an index template should be picked up when an index alias filter is parsed if a new index is introduced when a document is indexed into an index that doesn't exist yet via the bulk api.
Closes #10609
2015-04-24 09:43:16 +02:00
Simon Willnauer 15d58d91f1 [REST] Render REST errors in a structural way
This commit adds support for structural errors / failures / exceptions
on the elasticsearch REST layer. Exceptions are rendering with at least
a `type` and a `reason` corresponding to the exception name and the message.
Some expcetions like the ones associated with an index or a shard will have
additional information about the index the exception was triggered on or the
shard respectivly.

Each rendered response will also contain a list of root causes which is a list
of distinct shard level errors returned for the request. Root causes are the lowest
level elasticsearch exception found per shard response and are intended to be displayed
to the user to indicate the soruce of the exception.

Shard level response are by-default grouped by their type and reason to reduce the amount
of duplicates retunred. Yet, the same exception retunred from different indices will not be
grouped.

Closes #3303
2015-04-24 09:36:10 +02:00
Boaz Leskes c9d72431a3 Test: add afterIfFailed & afterIfSuccessful to ElasticsearchTestCase
Also use afterIfFailed to log more info from the rest tests
2015-04-24 09:10:23 +02:00
Ryan Ernst 1f5bdca8cc Mappings: Restrict murmur3 field type to sane options
Disabling doc values or trying to index hash values are not
correct uses of this the murmur3 field type, and just cause
problems.  This disallows changing doc values or index options
for 2.0+.

closes #10465
2015-04-23 21:48:42 -07:00
Robert Muir de109bdb3c Buffer this inputstream out of paranoia. guava copy goes byte-by-byte... 2015-04-23 22:15:16 -04:00
Robert Muir 500c956b45 Remove policy config file, its a resource.
Remove exposed boolean to turn off security.
Add unit test
2015-04-23 22:02:57 -04:00
Robert Muir b2850bff47 remove logging statements for another bikeshed 2015-04-23 21:18:56 -04:00
Zachary Tong 8435d9226f Fix bug in GiantGapWithPrediction, due to "slow start" of double exp 2015-04-23 19:13:58 -04:00
Zachary Tong a218d59ce1 Fix bug where MovAvgReducer would allow NaN's to "corrupt" the moving avg 2015-04-23 17:52:33 -04:00
Zachary Tong 114d10e5a9 [TEST] Restructure MovAvgTests to be more generic, robust 2015-04-23 17:52:33 -04:00
Robert Muir 5d2153fe9b remove stray sop 2015-04-23 16:03:19 -04:00
Robert Muir 573e81d2ea Ensure paths exist (or more permissions are needed later) 2015-04-23 16:01:16 -04:00
Robert Muir e2861bd7be ensure we only pull system filestores once time 2015-04-23 15:32:00 -04:00
Robert Muir ffd8db6828 Merge branch 'master' into put_me_in_coach
Conflicts:
	src/main/java/org/elasticsearch/env/NodeEnvironment.java
2015-04-23 15:09:34 -04:00
Robert Muir 0865d220f4 Remove crazy permissions for filestores, ssds, now that
this logic has been refactored.

Log a warning when security is disabled.
2015-04-23 15:04:58 -04:00
Igor Motov 60721b2a17 Snapshot/Restore: remove obsolete expand_wildcards_open and expand_wildcards_close options
In #6097 we made snapshot/restore index option consistent with other API. Now we can remove old style options from master.

Closes #10743
2015-04-23 13:29:24 -04:00
Robert Muir 05138151a2 Merge pull request #10755 from rmuir/filestores
refactor SSD/FileStore logic out of NodeEnvironment
2015-04-23 12:50:10 -04:00
Robert Muir a66cf85f37 refactor SSD/FileStore logic out of NodeEnvironment 2015-04-23 11:28:18 -04:00
tlrx adc0807c68 Internal: Add METADATA_READ and METADATA_WRITE blocks
This commit splits the current ClusterBlockLevel.METADATA into two disctins ClusterBlockLevel.METADATA_READ and ClusterBlockLevel.METADATA_WRITE blocks. It allows to make a distinction between
an operation that modifies the index or cluster metadata and an operation that does not change any metadata.

Before this commit, many operations where blocked when the cluster was read-only: Cluster Stats, Get Mappings, Get Snapshot, Get Index Settings, etc. Now those operations are allowed even when
the cluster or the index is read-only.

Related to #8102, #2833

Closes #3703
Closes #5855
Closes #10521
Closes #10522
2015-04-23 15:13:57 +02:00
Adrien Grand 2e2e345dcb Tests: Mute RiverTests.testMultipleRiversStart. 2015-04-23 14:53:26 +02:00
Robert Muir 7b6e470f5d Merge branch 'master' into put_me_in_coach 2015-04-23 08:34:27 -04:00
Colin Goodheart-Smithe 0ff4827e55 Fix MaxBucketReducer to use gapPolicy
Also moved gapPolicy and format ParseField constants to common class
2015-04-23 10:44:23 +01:00
Adrien Grand c6cdf7781b Mappings: simplify dynamic mappings updates.
While dynamic mappings updates are using the same code path as updates from the
API when applied on a data node since #10593, they were still using a different
code path on the master node. This commit makes dynamic updates processed the
same way as updates from the API, which also seems to do a better way at
acknowledgements (I could not reproduce the ConcurrentDynamicTemplateTests
failure anymore). It also adds more checks, like for instance that indexing on
replicas should not trigger dynamic mapping updates since they should have been
handled on the primary before.

Close #10720
2015-04-23 11:39:54 +02:00
Colin Goodheart-Smithe 1a1ddceb47 Muted failing MovAvgTests 2015-04-23 09:42:05 +01:00
Martijn van Groningen 38cb747c69 field stats: removed redundant package prefixes 2015-04-23 10:04:24 +02:00
Martijn van Groningen 5705537ecf Added field stats api
The field stats api returns field level statistics such as lowest, highest values and number of documents that have at least one value for a field.

An api like this can be useful to explore a data set you don't know much about. For example you can figure at with the lowest and highest response times are, so that you can create a histogram or range aggregation with sane settings.

This api doesn't run a search to figure this statistics out, but rather use the Lucene index look these statics up (using Terms class in Lucene). So finding out these stats for fields is cheap and quick.

The min/max values are based on the type of the field. So for a numeric field min/max are numbers and date field the min/max date and other fields the min/max are term based.

Closes #10523
2015-04-23 08:52:34 +02:00
Igor Motov 7bd4654bf3 Snapshot/Restore: make handling of expand_wildcards option consistent
Closes #6097
2015-04-22 19:43:36 -04:00
Zachary Tong 2a74f2ce0f [TESTS] randomize metric type, better naming, fix gap handling
- Randomizes the metric type between min/max/avg.  Should have identical behavior, but good to test
- Fixes improper handling of gaps due to a bug in the production of the "expected" dataset. Due to this fix,
randomization of gap policy was re-enabled
- Bunch of renaming to be more descriptive and less verbose
2015-04-22 18:59:39 -04:00
Zachary Tong 30177887b1 Add prediction capability to MovAvgReducer
This commit adds the ability for moving average models to output a "prediction" based on the current
moving average model.  For simple, linear and single, this prediction is simply converges on the
moving average's mean at the last point, leading to a straight line.  For double, this will
predict in the direction of the linear trend (either globally or locally, depending on beta).

Also adds some more tests.

Closes #10545
2015-04-22 18:59:30 -04:00
Jack Conradson a37d3c02ec Scripting: Added a new script construct
Added an initial script construct to unify the parameters typically
passed to methods in the ScriptService. This changes the way several public
methods are called in the ScriptService along with all the callers
since they must wrap the parameters passed in into a script object. In the
future, parsing parameters can also be moved into this construct along with
ToXContent.

closes #10649
2015-04-22 15:19:16 -07:00
Lee Hinman 2627324ac2 [ENGINE] Implement retries for ShadowEngine creation
When using a filesystem that may have lag between an index being created
on the primary and a on the replica, creation of the ShadowEngine can
fail because there are no segments in the directory.

In these situations, we retry during engine creation to wait until an
index is present in the directory. The number wait delay is
configurable, defaulting to waiting for 5 seconds from an index to
become available.

Resolves #10637
2015-04-22 14:25:05 -06:00
Simon Willnauer 8cd59151af Use debug logging if no translog file is found 2015-04-22 21:12:51 +02:00
Ryan Ernst 2d54738339 Tests: Add shortcut "all" to skip version ranges in rest tests
This was suggested on #10656 as cleaner than " - " to indicate all
versions should be skipped.

closes #10702
2015-04-22 11:40:26 -07:00
Adrien Grand f6f649ce40 Tests: Fix function_score explanation expectations. 2015-04-22 18:18:42 +02:00
Simon Willnauer bf7b912b71 Merge pull request #10724 from s1monw/rest_actions_helper
[REST] Add more utilitis for source/body handling in RestAction
2015-04-22 17:47:38 +02:00
Simon Willnauer b3ca94460c [REST] Add more utilitis for source/body handling in RestAction 2015-04-22 17:41:46 +02:00
Adrien Grand c2d3478a47 Merge pull request #10727 from jpountz/upgrade/lucene-5.2-snapshot-1675363
Upgrade to lucene-5.2-snapshot-1675363.
2015-04-22 17:26:05 +02:00
Adrien Grand dd679a3a38 Upgrade to lucene-5.2-snapshot-1675363.
This snapshot contains in particular LUCENE-6446 (refactored explanation API)
and LUCENE-6448 (better equals/hashcode for filters).
2015-04-22 17:23:17 +02:00
Robert Muir d7eba0df59 Merge pull request #10726 from rmuir/nuke_nested_classes
Don't use nested classes for Rest tests.
2015-04-22 11:05:10 -04:00
Colin Goodheart-Smithe dcf91ff02f Temporarily disabled gap policy randomisation in MovAvgTests 2015-04-22 16:01:23 +01:00
Jun Ohtani 7f08ab301d Fix RestSearchScrollAction to also accept source parameter instead of the request body 2015-04-22 23:55:15 +09:00
Robert Muir ec07a41514 Don't use nested classes for Rest tests.
Nested classes have the advantage of organizing the hack in a way
where its easy to see what is happening overall, but they have
the downside of class names with $ in them.

These names work just fine, but can require shell escaping
or other annoyances, which is the last thing you want if
you are trying to just reproduce.
2015-04-22 10:40:30 -04:00
Boaz Leskes 91ff3f6963 Test: add ensure green to indices.stats/12_level.yaml
Also changed the stash logger to not log all stashed values under debug (it does trace now) but do dump the stash content upon failure (under info as a XContent)
2015-04-22 15:56:45 +02:00
Colin Goodheart-Smithe 77e2f644e3 Derivative tests for gaps in metrics 2015-04-22 14:50:49 +01:00
Simon Willnauer 6f1b398b33 Fix RestAnalyzeAction to also accept source parameter instead of the request body 2015-04-22 15:30:04 +02:00
markharwood 05c3d05cff Query enhancement: single value numeric queries shouldn't be handled by NumericRangeQuery and should use a TermQuery wrapped in a ConstantScoreQuery instead.
Equally, single value filters should use TermFilters rather than NumericRangeFilters

Closes #10646
2015-04-22 12:10:51 +01:00
Michael McCandless 4d2bc25b1f Make NodeEnvironment.getFileStore a bit more defensive
This improves the NodeEnvironment code that walks through all mount
points looking for the one matching the file store for a specified
path, to make it a bit more defensive.  We currently rely on this to
log the correct file system type of the path.data paths.

Closes #10696
2015-04-22 06:24:42 -04:00
Isabel Drost-Fromm f857f9e47c Merge pull request #10526 from MaineC/bug-fix/10397-update-templates-not-recompiled
Closes #10397: Fix updating indexed search templates.
2015-04-22 11:15:12 +02:00
Colin Goodheart-Smithe f6934e0410 unit test for derivative of metric agg with gaps 2015-04-22 10:06:22 +01:00
Isabel Drost-Fromm a9d540a859 Fix updating templates.
Closes #10397

When putting new templates to an index they are added to the cache
of compiled templates as a side effect of the validate method. When
updating templates they are also validated but the scripts that are
already in the cache never get updated.

As per comments on PR #10526 adding more tests around updating scripts
and templates.
2015-04-22 11:00:13 +02:00
Jun Ohtani 0955c127c0 Rest: Add json in request body to scroll, clear scroll, and analyze API
Change analyze.asciidoc and scroll.asciidoc
Add json support to Analyze and Scroll, and clear scrollAPI
Add rest-api-spec/test

Closes #5866
2015-04-22 17:53:20 +09:00
Simon Willnauer 18ede79ed5 [TEST] Make StoreTest extraFS proof 2015-04-22 09:36:01 +02:00
Boaz Leskes a1ba339517 Stats: add CommitStats to supply information about the current commit point
Extends ShardStats with commit specific information. We currently expose commit id, generation and the user data map.

The information is also retrievable via the Rest API by using `GET _stats?level=shards`

Closes #10687
2015-04-22 09:33:14 +02:00
Simon Willnauer b53e8fa986 [TEST] make sure extraFS files are not in the metadata 2015-04-22 09:20:45 +02:00
Boaz Leskes 65eb4210b1 Test: mute testConcurrentDynamicMapping 2015-04-22 09:12:44 +02:00
Robert Muir 270cb9f349 enable securitymanager 2015-04-22 03:04:50 -04:00
Robert Muir 22b23f6e44 unbreak the COMPILE 2015-04-21 18:43:14 -04:00
Ryan Ernst 25410f880c Mappings: Simplified mapper lookups
We no longer support overriding field index names, but the lookup
data structures still optimize for this use case. This complicates
the work for #8871.  Instead, we can use a lookup structure
by making the legacy case slower.

This change simplifies the field mappers lookup to only
store a single map, keyed by the field's full name. It also
changes a lot of tests to decrease the uses of the older api
(looking up by index name where the index name is different
than the field name).

closes #10705
2015-04-21 15:00:28 -07:00
Nicholas Knize 453217fd7a [GEO] Prioritize tree_level and precision parameters over default distance_error_pct
If a user explicitly defined the tree_level or precision parameter in a geo_shape mapping their specification was always overridden by the default_error_pct parameter (even though our docs say this parameter is a 'hint'). This lead to unexpected accuracy problems in the results of a geo_shape filter. (example provided in issue #9691)

This simple patch fixes the unexpected behavior by setting the default distance_error_pct parameter to zero when the tree_level or precision parameters are provided by the user. Under the covers the quadtree will now use the tree level defined by the user. The docs will be updated to alert the user to exercise caution with these parameters.  Specifying a precision of "1m" for an index using large complex shapes can quickly lead to OOM issues.

closes #9691
2015-04-21 14:42:10 -05:00
Nicholas Knize 0205fc7ac2 [GEO] Fix OOM for high precision exotic shapes
This is currently submitted as a patch in LUCENE-6422. It removes unnecessary transient memory usage for QuadPrefixTree and, for 1.6.0+ shape indexes adds a new compact bit encoded representation for each quadcell. This is the heart of numerous false positive matches, OOM exceptions, and all around poor shape indexing performance. The compact bit representation will also allows for encoding 3D shapes in future enhancements.
2015-04-21 14:02:27 -05:00
Simon Willnauer 982da25f6e [TEST] Share code for mock engines
Today we have duplicated logic in the MockInternal and MockShadowEngine
since they need to subclass the actual engine. This commit shares the most of
the code making it easier to add mock engines in the future.
2015-04-21 20:15:04 +02:00
Colin Goodheart-Smithe 89d424e074 Derivative can now access multi-value metric aggregations 2015-04-21 16:00:02 +01:00
Adrien Grand d7abb12100 Replace deprecated filters with equivalent queries.
In Lucene 5.1 lots of filters got deprecated in favour of equivalent queries.
Additionally, random-access to filters is now replaced with approximations on
scorers. This commit
 - replaces the deprecated NumericRangeFilter, PrefixFilter, TermFilter and
   TermsFilter with NumericRangeQuery, PrefixQuery, TermQuery and TermsQuery,
   wrapped in a QueryWrapperFilter
 - replaces XBooleanFilter, AndFilter and OrFilter with a BooleanQuery in a
   QueryWrapperFilter
 - removes DocIdSets.isBroken: the new two-phase iteration API will now help
   execute slow filters efficiently
 - replaces FilterCachingPolicy with QueryCachingPolicy

Close #8960
2015-04-21 15:32:43 +02:00
markharwood 63db34f649 New feature - Sampler aggregation used to limit any nested aggregations' processing to a sample of the top-scoring documents.
Optionally, a “diversify” setting can limit the number of collected matches that share a common value such as an "author".

Closes #8108
2015-04-21 10:22:05 +01:00
Adrien Grand ac74247c6c Merge pull request #10634 from jpountz/fix/validate_mappings_on_master
Mappings: Validate dynamic mappings updates on the master node.
2015-04-21 11:19:58 +02:00
Adrien Grand 1adf232bb2 Mappings: Validate dynamic mappings updates on the master node.
This commit changes dynamic mappings updates so that they are synchronous on the
entire cluster and their validity is checked by the master node. There are some
important consequences of this commit:
 - a failing index request on a non-existing type does not implicitely create
   the type anymore
 - dynamic mappings updates cannot create inconsistent mappings on different
   shards
 - indexing requests that introduce new fields might induce latency spikes
   because of the overhead to update the mappings on the master node

Close #8688
2015-04-21 11:08:21 +02:00
Adrien Grand ca03e40605 Internal: Ensure that explanation descriptions are not null on serialization.
As requested on #10399
2015-04-21 11:08:21 +02:00
Martijn van Groningen 24c75dec2d Merge pull request #10694 from martijnvg/matched_queries/cleanup
matched queries: Remove redundant and broken code
2015-04-21 10:55:49 +02:00
Adrien Grand cc9957fe0e Merge pull request #10689 from jpountz/enhancement/check_expl_desc
Internal: Ensure that explanation descriptions are not null on serialization.

Close #10399
2015-04-21 09:50:48 +02:00
Martijn van Groningen bb1cd65c0d matched queries: Remove redundant and broken code
Because the fetch phase now has nested doc, the logic that deals with detecting if a named nested query/filter matches with a hit can be removed.

Closes #10661
2015-04-21 08:52:51 +02:00
Adrien Grand b69e7e4d35 Internal: Ensure that explanation descriptions are not null on serialization.
As requested on #10399
2015-04-20 23:58:28 +02:00
Igor Motov faf725b788 Improve the error message when attempting to snapshot a closed index
Currently the error message is the same when index is closed and when it is missing shards. This commit will generate a specific failure message when a user tries to create a snapshot of a closed index.

Related to #10579
2015-04-20 15:55:32 -04:00
Isabel Drost-Fromm 717d9ec1d0 Merge pull request #10525 from MaineC/bug-fix/JVM_Checker
Fix typo in JVM checker user help.

When checking the JVM we provide the user with help on which environment variable to use to disable the check in case the check fails. Fixing the variable we point the user to - should be JAVA_OPTS
2015-04-20 19:35:40 +02:00
Ryan Ernst 3a04d3ca91 Mappings: Remove dead code after previous refactorings
This is mostly removing code that handled deletion of types, which was
removed in #8877.

closes #10666
2015-04-20 10:07:24 -07:00
Simon Willnauer 24d1f595a5 [TEST] Add back old way for naming clusters 2015-04-20 18:29:27 +02:00
Simon Willnauer 5730c06af9 [STORE] Move to on data.path per shard
This commit moves away from using stripe RAID-0 simumlation across multiple
data paths towards using a single path per shard. Multiple data paths are still
supported but shards and it's data is not striped across multiple paths / disks.
This will for instance prevent to loose all shards if a single disk is corrupted.

Indices that are using this features already will automatically upgraded to a single
datapath based on a simple diskspace based heuristic. In general there must be enough
diskspace to move a single shard at any time otherwise the upgrade will fail.

Closes #9498
2015-04-20 17:19:45 +02:00
javanna 91afe64df7 [TEST] remove unused ElasticsearchIntegrationTest#afterTestFailed method 2015-04-20 16:51:27 +02:00
Colin Goodheart-Smithe ea1470a080 More tests for max bucket reducer 2015-04-20 15:09:10 +01:00
Tanguy Leroux 0dad33f17f Update after @eletrical review 2015-04-20 14:58:19 +02:00
Tanguy Leroux 867955188e Standardization of packages structure and install
The existing DEB/RPM packages have a lot of differences: they don't execute the same actions when installing or removing the package. They also don't declare exactly the same environment variables at the same place. At the end of the day the global behavior and configuration is *almost* the same but it's very difficult to maintain the scripts.

This commits unifies the package behavior:
- DEB/RPM use the same package scripts (pre installation, post installation etc) in order to execute exactly the same actions
- Use of a unique environment vars file that declares everything needed by scripts (the goal is to delete vars declaration in init.d and systemd scripts, this will be done in another PR)
- Variables like directory paths are centralized and replaced according to the target platform (using #10330)
- Move /etc/rc.d/init.d to standard /etc/init.d (RPM only)
- Add PID_DIR env var
- Always set ES_USER, ES_GROUP,MAX_MAP_COUNT and MAX_OPEN_FILES in env vars file
- Create log, data, work and plugins directories with DEB/RPM packaging system
- Change to elastic.co domain in copyright and control files
- Add Bats files to automate testing of DEB and RPM packages
- Update TESTING.asciidoc

More info on Bats here:  https://github.com/sstephenson/bats
2015-04-20 14:58:19 +02:00
Adrien Grand 2b0440368c Merge pull request #10674 from jpountz/enhancement/indexsearcher_count
Search: Cut over to IndexSearcher.count.

Close #10674
2015-04-20 14:54:48 +02:00
Adrien Grand 03c07377e3 Search: Cut over to IndexSearcher.count.
There is a new IndexSearcher.count method that makes it easier to count how
many documents match a particular query.
2015-04-20 14:49:35 +02:00
Robert Muir db096b4404 Merge pull request #10656 from elastic/mockfilesystem
Integrate better with lucene test framework and mockfilesystems
2015-04-20 08:14:06 -04:00
Simon Willnauer a6c154aa7a Use dummy TermStatistics when term is not found Closes #10660 2015-04-20 11:46:29 +02:00
Shay Banon 45fa5dcad9 Cleanup local code transport execution
Now that we handle automatically the local execution within the transport service, we can remove parts of the code that handle it in actions.
closes #10582
2015-04-20 10:43:06 +02:00
Robert Muir 2ed711fc6f mark just this method as @Slow, can easily take over a minute 2015-04-19 15:09:16 -04:00
Robert Muir b09d236fc0 run tests with AssertingCodec to find bugs 2015-04-19 13:56:12 -04:00
Ryan Ernst 68f75ea7b6 simplified rest skip range version parsing more, ranges can now be open
ended
2015-04-19 06:50:08 -07:00
Robert Muir 9e0a9588e8 add more paranoia to PathUtils 2015-04-19 09:21:45 -04:00
Ryan Ernst 22af0e627c cleanup order of before/after stuff, reorganize helper methods a bit 2015-04-18 18:17:13 -07:00
Robert Muir b728772fe4 more fine-grained @slow tuning, remove from many tests that got unlucky with fsync 2015-04-18 19:59:29 -04:00
Ryan Ernst 137875513e remove fixed seed for version util tests 2015-04-18 13:28:17 -07:00
Ryan Ernst b46df4d5dc suppress extrasfs from integ tests, fix bug in random version util 2015-04-18 13:25:00 -07:00
Ryan Ernst 06eee11dbb simplify version handling in rest tests, add tests for version utilities 2015-04-18 12:48:00 -07:00
Robert Muir d301567ecf let tests.verbose tell the story 2015-04-18 13:48:33 -04:00
Ryan Ernst ce6b3774ec move version related stuff to dedicated test utility 2015-04-18 03:00:45 -07:00
Ryan Ernst d8a92947d1 removed some esoteric helper functions, shuffled methods around in base class 2015-04-18 01:53:22 -07:00
Ryan Ernst e91a7de9f7 move rest and integration test annotations and sysprops to their respective tests 2015-04-18 01:00:45 -07:00
Robert Muir d2854d7267 mark slow tests with @Slow annotation 2015-04-18 02:23:05 -04:00
Ryan Ernst b27c7f0d2a suppress extrasfs from corrupted file test 2015-04-17 21:09:36 -07:00
Ryan Ernst 310e04bdb3 Merge branch 'mockfilesystem' of github.com:elastic/elasticsearch into mockfilesystem 2015-04-17 20:53:46 -07:00
Ryan Ernst e4de0cb57f removed jvm ordinal constant, only really needed now for test cluster
port numbering (moved to there)
2015-04-17 20:52:38 -07:00
Robert Muir c7ce72733d disable extras for this test 2015-04-17 23:52:28 -04:00
Robert Muir 96f08a38e6 parallelize rest tests 2015-04-17 23:38:01 -04:00
Ryan Ernst 621f502b12 move bwc specific stuff to backcompat base class 2015-04-17 18:48:34 -07:00
Robert Muir 52c4af6115 remove these helpers 2015-04-17 21:22:57 -04:00
Robert Muir a312098785 nuke duplicate methods 2015-04-17 21:09:53 -04:00
Robert Muir 61b60da7d2 nuke some unused stuff 2015-04-17 21:02:05 -04:00
Robert Muir aa381a2775 fold ESTestCase into ElasticsearchTestCase 2015-04-17 20:35:28 -04:00
Robert Muir 84811a57d6 nuke ElasticsearchSingleNodeLuceneTestCase 2015-04-17 20:19:32 -04:00
Robert Muir 0ff0a0082d fix backwards test to not muck with URIs or get mad about extra clusters 2015-04-17 19:41:55 -04:00
Robert Muir 43b6cd2118 Merge branch 'master' into mockfilesystem 2015-04-17 19:15:25 -04:00
Robert Muir e71553556e remove tests.processors, this is a reproducibility nightmare 2015-04-17 18:32:52 -04:00