Commit Graph

11050 Commits

Author SHA1 Message Date
Colin Goodheart-Smithe 53de93a89b Aggregations: Added Factory for all MultiBucketAggregations to implement
This allows things like reducers to add aggregations to buckets without needing to know how to construct the aggregation or bucket itself.
2015-03-24 15:17:45 +00:00
Colin Goodheart-Smithe b751f0e11b added validation of reducers 2015-03-23 09:12:28 +00:00
Colin Goodheart-Smithe cb4ab06021 missed file in merge 2015-03-18 14:14:00 -07:00
Colin Goodheart-Smithe 2ac93098b2 Merge branch 'master' into feature/aggs_2_0
Conflicts:
	src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregator.java
	src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificanceHeuristicTests.java
2015-03-18 14:13:44 -07:00
Robert Muir 5f1ed47df6 Merge pull request #10143 from rmuir/bwcompat1
use bigger back compat indexes
2015-03-18 14:49:32 -04:00
Robert Muir 3a0700862a regenerate 0.90.x indexes without completion suggester 2015-03-18 14:29:41 -04:00
Robert Muir 087b107dd2 Create bigger back compat indexes. 2015-03-18 14:16:16 -04:00
Britta Weber dca0104061 [TEST] muste test, we have an issue for it and know what is going on 2015-03-18 10:17:38 -07:00
Britta Weber fc5dcf189c [release script] Check for //NORELEASE in code before release
Lines in the code that should be removed before a release can be annotated with
//NORELEASE . This can be useful when debugging test failures. For example,
one might want to add additional logging that would be too verbose for production
and therfore should be removed before releasing.

closes #10141
2015-03-18 09:59:28 -07:00
Michael McCandless a85b13773f Fix typo in UnavailableShardsException message
Closes #10140
2015-03-18 12:41:13 -04:00
javanna fdfdf594f9 [TEST] RepeatOnExceptionRule to rethrow unexpected exception
In case an exception was caught by the repeat rule, the retry mechanism would kick in only if the exception was the expected one. If not an NPE got thrown, while we should rather just bubble it up to the caller. This makes `NettyTransportMultiPortTests` run from a plane. An assumption would kick in to make sure that the test gets ignored but the `AssumptionViolationException` was caught and not properly re-thrown.
2015-03-18 14:08:46 +01:00
Simon Willnauer 56a2fb04ee [ALLOCATION] Early terminate if the cluster can't be rebalanced
By default we won't allow rebalance operation if no all shards are active.
if this is the case we don't need to worry about costly rebalance calculations at all.
2015-03-17 22:49:05 -07:00
Simon Willnauer 9ad1434a3b [TEST] Add test for restoring into a shadowreplica enabled index 2015-03-17 18:26:41 -07:00
Simon Willnauer 9554e509e3 [PLUGINS] Always send current ES version when downloading plugins
to enable download servers to send the correct plugin version for the
node that is installing it this PR sends the current version as a header
to the server.
2015-03-17 16:44:09 -07:00
Drew Raines e49aa2dee8 Merge pull request #9938 from drewr/issue/6297/cat/npe
_cat/nodes: Thread null handling through stats and info
2015-03-17 16:02:47 -07:00
Simon Willnauer 02679e7c43 [BUILD] fix snapshot URL 2015-03-17 15:27:39 -07:00
Simon Willnauer ed7f6526b9 [TRANSPORT] Close all resources if doStart fails
Closes #9898
2015-03-17 14:40:37 -07:00
Christoph Büscher 3063f06fc7 Add randomiziation to test for derivative aggregation 2015-03-17 13:53:34 -07:00
Joshua Rich db2caa54cd Small grammar fix. 2015-03-17 11:27:13 -07:00
Alexander Reelsen b8334513d7 Transport: Return useful error message on potential HTTP connect
In case a HTTP client connects to the transport protocol and issues a
HTTP method followed by a space, we can just try to be smart and return
a string back to the client to point the user to the fact that the wrong
port has been used.

Closes #2139
Closes #10108
2015-03-17 09:47:24 -07:00
Boaz Leskes b605184471 Recovery: add total operations to the `_recovery` API
This commit adds the current total number of translog operations to the recovery reporting API. We also expose the recovered / total percentage:

```
"translog": {
   "recovered": 536,
   "total": 986,
   "percent": "54.3%",
   "total_time": "2ms",
   "total_time_in_millis": 2
},
```

Closes #9368
Closes #10042
2015-03-17 07:31:29 -07:00
Simon Willnauer 73953142a7 [BUILD] fix snapshot URL 2015-03-16 22:59:49 -07:00
Martijn van Groningen ef3cb2d436 percolator: Take filters from index aliases into account when selecting queries to run on a document.
The filter from an indexed alias is as if you would filter on the metadata of a percolator query, but then the filter is defined in the index alias instead of the percolate request.

Closes #6241
2015-03-16 17:25:55 -07:00
Martijn van Groningen 4393939f5e inner_hits: Nested parent field should be resolved based on the parent inner hit definition, instead of the nested parent field in the mapping.
The behaviour is better in the case someone has multiple levels of nested object fields defined in the mapping and like to define a single inner_hits definition that is two or more levels deep.

If someone wants inner hits on a nested field that is 2 levels deep the following would need to be defined:

```
{
  ...
  "inner_hits" : {
     "path" : {
        "level1" : {
            "inner_hits" : {
               "path" : {
                  "level2" : {
                     "query" : { .... }
                  }
               }
            }
        }
     }
  }
}
```

With this change the above can be defined as:

```
{
  ...
  "inner_hits" : {
     "path" : {
        "level1.level2" : {
            "query" : { .... }
        }
     }
  }
}
```

Closes #9251
2015-03-16 16:31:03 -07:00
Simon Willnauer 8e58c0b7a8 Add license header to signature files 2015-03-16 14:19:08 -07:00
Simon Willnauer 1f712842f7 [TEST] Ban @Seed from test 2015-03-16 14:17:51 -07:00
Colin Goodheart-Smithe 68c043f730 Fixes ignore_malformed behaviour for ip fields 2015-03-16 13:43:53 -07:00
Boaz Leskes dc4c8c2693 Tests: improve logging of external node version and build
The BWC tests also run against a snapshot build of previous release branches. Upon a failure it's important to know what commit exactly was used.

Closes #10111
2015-03-16 12:37:08 -07:00
Boaz Leskes a1f5c342af Translog: stats fail to serialize size
Closes #10105
2015-03-16 10:55:28 -07:00
Simon Willnauer 5e9de0f8bc [VERSION] Add [1.6.0]-SNAPSHOT 2015-03-16 10:26:53 -07:00
Simon Willnauer 7b344f8305 Merge pull request #10102 from s1monw/remove_wait_for_merge
[ENGINE] Remove reflection call to waitForMerges
2015-03-15 22:59:44 -07:00
Simon Willnauer e2d82504cc [ENGINE] Remove reflection call to waitForMerges
Since the index writer is now final we can remove the readlock around
the forceMerge calls and use the official API to wait for merges.
2015-03-15 22:56:51 -07:00
Adrien Grand d28dc2f883 Internal: Fix PageCacheRecycler's max page size computation.
PageCacheRecycler was mistakenly using the maximum number of items per page
instead of the byte size of a page. This could result in higher memory usage
than configured.

Close #10077
2015-03-16 04:25:43 +01:00
Christoph Büscher ab5e020114 Aggregations: Be lenient when converting local to utc time in time zone roundings
This solves a problem in the time zone rounding classes where time dates that
fall into a DST gap will cause joda time library to throw an exception.
Changing the conversion methods 'strict' option to false prevents this.

Closes #10025
2015-03-15 19:57:21 -07:00
Lee Hinman 9bf4afd88e [TEST] Add `-Pdev` to the TESTING.asciidoc guide 2015-03-15 18:48:17 -06:00
Boaz Leskes 97559c0614 Engine: update index buffer size during recovery and allow configuring version map size.
To support real time gets, the engine keeps an in-memory map of recently index docs and their location in the translog. This is needed until documents become visible in Lucene. With 1.3.0, we have improved this map and made tightly integrated with refresh cycles in Lucene in order to keep the memory signature to a bare minimum. On top of that, if the version map grows above a 25% of the index buffer size, we proactively refresh in order to be able to trim the version map back to 0 (see #6363) . In the same release, we have fixed an issue where an update to the indexing buffer could result in an unwanted exception during recovery (#6667) . We solved this by waiting with updating the size of the index buffer until the shard was fully recovered. Sadly this two together can have a negative impact on the speed of translog recovery.

During the second phase of recovery we replay all operations that happened on the shard during the first phase of copying files. In parallel we start indexing new documents into the new created shard. At some point (phase 3 in the recovery), the translog replay starts to send operation which have already been indexed into the shard. The version map is crucial in being able to quickly detect this and skip the replayed operations, without hitting lucene. Sadly #6667 (only updating the index memory buffer once shard is started) means that a shard is using the default 64MB for it's index buffer, and thus only 16MB (25%) for the version map. This much less then the default index buffer size 10% of machine memory (shared between shards).

Since we don't flush anymore when updating the memory buffer, we can remove #6667 and update recovering shards as well. Also, we make the version map max size configurable, with the same default of 25% of the current index buffer.

Closes #10046
2015-03-15 14:45:41 -07:00
Boaz Leskes a596459ed6 Test: testClusterFormingWithASlowNode - make delays less aggressive 2015-03-15 13:57:49 -07:00
Michael McCandless 7861385221 Core: remove index.fail_on_corruption setting
Now we always fail the engine if corruption is detected.

Closes #10092
2015-03-14 17:11:44 -04:00
Simon Willnauer caafad750a [TEST] Fix test to use correct type in the mapping 2015-03-14 13:18:10 -07:00
Michael McCandless 0683a66277 Core: remove index.fail_on_merge_failure
Always fail the engine if an unexpected exception is hit during merge.

Closes #10088
2015-03-14 09:53:42 -04:00
javanna ebe1a4663d [TEST] renamed variables in ScriptServiceTests 2015-03-13 12:59:40 -07:00
Lee Hinman 6aec68cd29 Revert "[QUERY] Remove lowercase_expanded_terms and locale options"
This reverts commit d1f7bd97cb.

Ryan pointed out that this needs to work with the multi term query, so
additional analysis and tests should be added.
2015-03-13 13:51:44 -06:00
Lee Hinman d1f7bd97cb [QUERY] Remove lowercase_expanded_terms and locale options
The analysis chain should be used instead of relying on this, as it is
confusing when dealing with different per-field analysers.

The `locale` option was only used for `lowercase_expanded_terms`, which,
once removed, is no longer needed, so it was removed as well.

Fixes #9978
Relates to #9973
2015-03-13 13:17:27 -06:00
mikemccand ee8aaead78 Core: don't rethrow merge exceptions
We already 1) log the full exception, and 2) fail the engine.

Closes #10083
2015-03-13 10:59:01 -07:00
Boaz Leskes 3fbd934e30 Translog: make sure stats's op count and size are in sync
During translog flush there is a very small window where translog stats reports can be inconsistent.

Closes #10041
2015-03-13 10:42:58 -07:00
javanna a8271595dc Scripting: File scripts cache key to include language to prevent conflicts
The file scripts cache key should include the language of the script to prevent conflicts between scripts with same name but different extension (hence lang). Note that script engines can register multiple acronyms that may be used as lang at execution time (e.g. javascript and js are synonyms). We then need to make sure that the same script gets loaded no matter which of the acronyms is used at execution time. The problem didn't exist before this change ad the lang was simply ignored, while now we take it into account.

This change has also some positive effect on inline scripts caching. Up until now, the same script referred to with different acronyms would be compiled and cached multiple times, once per acronym. After this change every script gets compiled and cached only once, as we chose internally the acronym used as part of the cache key, no matter which one the user provides.

Closes #10033
2015-03-12 23:18:00 -07:00
Petr Bela f27cb07eb9 [DOCS] fix typo in scripting docs 2015-03-12 15:28:50 -07:00
Simon Willnauer 8b4f6e0111 [SHARD] make assert less strict to ensure local node is not null 2015-03-12 12:11:20 -07:00
Igor Motov 55f2a547d0 Snapshot/Restore: delete operation should ignore finalizing shards on nodes that no longer exist
Related to #9924
2015-03-11 12:10:48 -07:00
olivier bourgain 2c4aaa0838 [DOCS] fix typo in BoolQueryBuilder javadocs 2015-03-10 08:21:34 -07:00