Commit Graph

15329 Commits

Author SHA1 Message Date
Zachary Tong ab2f295c16 Collect and pass unparsed params to buildFactory(), replacing doParse()
doParse() was supposed to allow aggs to perform extra parsing.  Unfortunately, this forced the
parser to carry instance-level state, which would carry-over and "corrupt" any other aggs of the
same type in the same query.

Instead, we are now collecting all unknown params and pasing them as a Map<String, Object>
to buildFactory().  The agg may then parse them and instantiate a factory.  Each param the
agg uses, it should unset from the unusedParams object.

After building the factory, the parser verifies that unusedParams is empty.  If it is not empty,
an exception is raised so the user knows they provided unknown params.

Fixes #13337
2015-09-04 08:35:13 -04:00
Tanguy Leroux 41aa1a7a71 Manually synchronize listeners when iterating on them in InternalClusterInfoService 2015-09-04 13:50:57 +02:00
Adrien Grand 216335abcf Tests: @AwaitsFix on PercentilesBucketIT.testNested. 2015-09-04 10:47:30 +02:00
Adrien Grand 42f178e8c2 Merge pull request #13308 from jpountz/fix/deprecations_5.3
Fix deprecations introduced by the upgrade to Lucene 5.3
2015-09-04 10:16:23 +02:00
Adrien Grand 4f5591be8d Fix deprecations introduced by the upgrade to Lucene 5.3
This changes construction of Phrase and Boolean queries to use the builder,
and replaces BitDocIdSetFilter with BitSetProducer for nested and parent/child
queries. I had to remove the ParentIdsFilter for the case when there was a
single parent as it was using the source of BitSets for parents as a regular
Filter, which is not possible anymore now. I don't think this is an issue since
this case rarely occurs, and the alternative logic for when there are several
matching parent ids should not be much worse.
2015-09-04 10:16:01 +02:00
Zachary Tong c5b39ce85e [DOCS] Fix broken inter-page link 2015-09-03 23:17:01 -04:00
Zachary Tong f8ad4da61c Merge pull request #13186 from polyfractal/feature/percentile_pipeline
Aggregations: Add percentiles_bucket pipeline aggregation
2015-09-03 22:36:40 -04:00
Zachary Tong 1016734b4c Aggregations: Add percentiles_bucket pipeline aggregations
This pipeline will calculate percentiles over a set of sibling buckets.  This is an exact
implementation, meaning it needs to cache a copy of the series in memory and sort it to determine
the percentiles.

This comes with a few limitations: to prevent serializing data around, only the requested percentiles
are calculated (unlike the TDigest version, which allows the java API to ask for any percentile).
It also needs to store the data in-memory, resulting in some overhead if the requested series is
very large.
2015-09-03 22:24:14 -04:00
Nicholas Knize 17460ae92d Refactor ignore_malformed and coerce from geo_point field type to mapper
This commit moves ignore_malformed and coerce options from the GeoPointFieldType to the Builder in GeoPointFieldMapper. This makes these options consistent with other types in 2.0.
2015-09-03 17:02:51 -05:00
David Pilato b2c584b21d Remove jmeter files
Follow up for #13317.
2015-09-03 22:36:50 +02:00
David Pilato 6319f383c4 Remove assembly files in core
Closes #13317.
2015-09-03 22:36:50 +02:00
Robert Muir 35aafdf7b7 Merge pull request #13328 from rmuir/remove_broadcast_check
Remove broadcast address check.
2015-09-03 16:15:26 -04:00
Robert Muir 529ad7fe79 Remove broadcast address check.
This was supposed to just help the user, in case they misconfigured something.
Broadcast is an ipv4 only thing, the only way you can really detect its a broadcast
address, is to look and see if an interface has that address as its broadcast address.

But we cannot trust that container interfaces won't have a crazy setup...

Closes #13327
2015-09-03 16:01:14 -04:00
Robert Muir 3e9daa1040 Merge pull request #13324 from rmuir/lucene_1701068
Upgrade master to lucene 5.4-snapshot r1701068
2015-09-03 15:28:52 -04:00
Robert Muir f216d92d19 Upgrade to lucene 5.4-snapshot r1701068 2015-09-03 15:13:33 -04:00
Clinton Gormley 877589e153 In the license checker, include the "ignore prefix" parameter in the output
Closes #13322
2015-09-03 21:00:11 +02:00
javanna da554fc30c Query DSL: match_phrase_prefix to take boost into account
The match_phrase_prefix query properly parses the boost etc. but it loses it in its rewrite method. Fixed that by setting the orginal boost to the rewritten query before returning it. Also cleaned up some warning in MultiPhrasePrefixQuery.

Closes #13129
Closes #13142
2015-09-03 19:46:42 +02:00
Jason Tedor 2a4b7a7fe3 Merge pull request #13318 from jasontedor/fix/13315
Workaround pitfall in Java 8 target-type inference
2015-09-03 13:10:40 -04:00
Jason Tedor 5c4b864a42 Workaround pitfall in Java 8 target-type inference
Target-type inference has been improved in Java 8. This leads to these
lines now being interpreted as invoking String#valueOf(char[]) whereas
they previously were interpreted as invoking String#valueOf(Object).
This change leads to ClassCastExceptions during test execution. Simply
casting the parameter to Object restores the old invocation.

Closes #13315
2015-09-03 13:10:01 -04:00
Robert Muir 11314336b6 bump master (3.0-snapshot) to java 8
Closes #13314

Squashed commit of the following:

commit 0e2d6c8e55e07957d0bea08f3c80f51f481ba6d4
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 12:49:51 2015 -0400

    re-enable the rest of this test, as its one method that hangs

commit 04dc6b62d4800f574babcdbbf0e44f5c3400e0f0
Merge: 2b12805 52945b2
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 12:48:55 2015 -0400

    Merge branch 'master' into java8

commit 2b128056ded741cddaf1d92c55920d7baf80dc95
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 12:28:07 2015 -0400

    more jsr166e removal

commit 5826feba484389a87dbcad9a53ee5bf9a306eb61
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 12:15:13 2015 -0400

    disable broken test

commit aabd88b85f2dd7b9b2b9308ffd52bc71aef8ab82
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 12:11:12 2015 -0400

    Disable broken test

commit 863463303a12415dfecd6a46a6767eb07a2c7415
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Sep 3 11:38:32 2015 -0400

    bump master (3.0-snapshot) to java 8
2015-09-03 12:55:21 -04:00
Britta Weber 52945b2b46 [test] mute testReadOnPostRecoveryShards 2015-09-03 18:27:09 +02:00
javanna 6e00a613ee Internal: simplify filtered query conversion to lucene query
We have some optimization in FilteredQueryParser that tries to mimic what the rewrite method in lucene does, based on what gets parsed we return the simplest query possible. That might cause issues with boost values though, if specified in both the main query and the inner query that we shortcut to. We should rather rely on lucene's rewrite method to simplify the lucene representation of the query, and always build a filtered query instead.

relates to #13272
Closes #13312
2015-09-03 17:13:00 +02:00
Adrien Grand 3cd86a5140 Merge pull request #13311 from jpountz/enhancement/more_scroll_optimizations
Optimize scrolls for constant-score queries.
2015-09-03 16:59:28 +02:00
Adrien Grand 745b977ce7 Optimize scrolls for constant-score queries.
We currently optimize scroll when sort=_doc because docs are returned in order.
But documents are also returned in order when sorting by score and the query
gives constant scores. This optimization has the nice side-effect of also
optimizing scrolls with the default `match_all` query.
2015-09-03 16:12:04 +02:00
Robert Muir 4b0182932a Merge pull request #13299 from rmuir/network_config_improvements
Improve situation when network.host is set to wildcard (e.g. 0.0.0.0)
2015-09-03 08:18:46 -04:00
David Pilato ac9682dd00 [test] cloud-aws has been replaced by repository-s3 and discovery-ec2 2015-09-03 12:52:02 +02:00
Britta Weber 8e4e98099d Merge pull request #13307 from brwe/doc-script-fix
[doc] remove comment about function_score faster than script sort. It…
2015-09-03 12:36:33 +02:00
Britta Weber 2b27bc11b6 [doc] remove comment about function_score faster than script sort. It is not so. 2015-09-03 12:33:00 +02:00
David Pilato 6953193f5b [test] fix test names
For aws s3 and ec2
2015-09-03 12:21:26 +02:00
David Pilato 4bffdbfafc [doc] fix cross link between core and plugins doc
For ec2 and s3
2015-09-03 12:11:58 +02:00
David Pilato a117fc85a6 Update help install for discovery-ec2 and repository-s3 2015-09-03 11:29:45 +02:00
David Pilato 2931687b46 Merge remote-tracking branch 'origin/master' 2015-09-03 11:13:19 +02:00
David Pilato 30aa231f8e [plugin] split cloud-aws in repository-s3 and discovery-ec2
Until now we had a cloud-aws plugin which is providing 2 disctinct features:

* discovery on EC2
* snapshot/restore on S3

This commit splits the plugin by feature so people can use either one or the other or both features.

Doc is updated accordingly.
2015-09-03 11:12:20 +02:00
Colin Goodheart-Smithe ddd064ce1f [TESTS] Changed message in NamingConventionTests to reflect code checks
Before this change the check would check that all test classes end in Tests but the message would say they need to end in Test or Tests which was confusing.
2015-09-03 10:08:25 +01:00
Simon Willnauer 796701d52e Move version to 3.0.0-SNAPSHOT 2015-09-03 10:43:28 +02:00
Adrien Grand 2f29e4b5b4 Merge pull request #13037 from jpountz/enhancement/quick_counts
Optimize counts on simple queries.
2015-09-03 09:47:47 +02:00
Adrien Grand 5ff9ca9965 Optimize counts on simple queries.
Today we always collect in order to compute counts, but some of them can be
easily optimized by using pre-computed index statistics. This is especially
true in the case that there are no deletions, which should be common for the
time-based data use-case.

Counts on match_all queries can always be optimized, so requests like

```
GET index/_search?size=0

GET index/_search
{
  "size": 0,
  "query" : {
    "match_all": {}
  }
}
```

should now return almost instantly. Additionally, when there are no deletions,
term queries are also optimized, so the below queries which all boil down to a
single term query would also return almost immediately:

```
GET index/type/_search?size=0

GET index/_search
{
  "size": 0,
  "query" : {
    "match": {
      "foo": "bar"
    }
  }
}

GET index/_search
{
  "size": 0,
  "query" : {
    "constant_score": {
      "filter": {
        "exists": {
          "field": "foo"
        }
      }
    }
  }
}
```
2015-09-03 09:36:51 +02:00
Adrien Grand bd44dbe5cd Docs: Insist that setting size=0 will help performance. 2015-09-03 09:36:34 +02:00
Adrien Grand d85cbd9f37 Merge pull request #13295 from sksamuel/patch-1
Updated param name to match type
2015-09-03 09:23:20 +02:00
Lee Hinman f25befda12 Merge remote-tracking branch 'dakrone/fix-Xloggc-args' 2015-09-02 22:04:51 -06:00
Robert Muir 6bdf89c47e Improve situation when network.host is set to wildcard (e.g. 0.0.0.0)
Users might specify something like -Des.network.host=0.0.0.0, as that
was the old default with previous versions of elasticsearch. This means
to bind to all interfaces, but it makes no sense as a publish address.

Pick a good one in this case, just like we do in other cases where
publish isn't explicitly specified and we are bound to multiple (e.g.
when configured by interface, or dns hostname with multiple addresses).
However, in this case warn the user about it: since its arbitrarily
picking the first non-loopback address like the old versions
did, thats a little too heuristical, but lets make the cutover easy.

Separately, fail hard if things like multicast or broadcast addresses are
configured as bind or publish addresses, as that is simply invalid.

Closes #13274
2015-09-02 23:03:31 -04:00
Igor Motov e288c9b0ce Tests: set the upper bound on the number of simulated failures in a restore test
The number and distribution of errors in some restore test may cause restore process to continue to fail for a prolong time. This test caps the total number of simulated failures to make sure that restore is guaranteed to eventually succeed after a limited number of retries.
2015-09-02 19:13:45 -04:00
Lee Hinman 3b0b05f6cd Don't surround -Xloggc log filename with quotes
The `-Xloggc:filename.log` parameter has very strict filename semantics:

```
[A-Z][a-z][0-9]-_.%[p|t]
```

Our script specifies \" and \" to surround it, which makes Java think we
are sending: -Xloggc:"foo.log" and it fails with:

```
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been "foo.log"
Note %p or %t can only be used once
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```

We can't quote this, and we should not need to since the valid
characters don't include a space character, so we don't need to worry
about quoting.

Resolves #13277
2015-09-02 16:45:46 -06:00
Ryan Ernst f202ecdc84 Merge pull request #13294 from rjernst/no_test_exclusions3
Rename test suffix so we only use "Tests"
2015-09-02 15:19:17 -07:00
Stephen Samuel 8057f71c1d Updated param name to match type 2015-09-02 23:07:17 +01:00
Ryan Ernst 06d5e24548 Tests: Rename test suffix so we only use "Tests"
We currently have a small number of test classes with the suffix "Test",
yet most use the suffix "Tests". This change renames all the "Test"
classes, so that we have a simple rule: "Non-inner classes ending with
Tests".
2015-09-02 14:38:43 -07:00
Jason Tedor fe46227db8 Remove sole usgae of com.google.common.annotations.Beta 2015-09-02 17:31:11 -04:00
Simon Willnauer d10f80aea0 Merge pull request #13203 from kiryam/master
Add listeners for postIndex, postCreate, and postDelete
2015-09-02 22:52:29 +02:00
Ryan Ernst e40b2d5dd7 Merge pull request #13291 from rjernst/no_test_exclusions2
Remove stress tests
2015-09-02 13:45:06 -07:00
Ryan Ernst 0caa473353 Remove benchmark/stress too 2015-09-02 13:44:42 -07:00