Commit Graph

7556 Commits

Author SHA1 Message Date
Justin Etheredge 36219a1786 [DOCS] Updating scripting docs for geo functions
Added a few functions are corrected the default unit where necessary
2014-03-17 11:59:02 +01:00
Boaz Leskes ee8743f3f2 [Docs] added a missing reference to significantterms-aggergations
Also fix header level mismatch issue reported by the build
2014-03-17 11:45:55 +01:00
Boaz Leskes 2a31bd83ef [Tests] QuorumLocalGatewayTests - Set mini_master_nodes earlier to make sure it has effect. ClusterServiceTests - remove a thread.sleep in favor of awaitBusy 2014-03-17 11:01:43 +01:00
Boaz Leskes fcfeab3a52 [Test] FullRollingRestartTests - correctly setting minimum_master_nodes
Also added a ElasticsearchIntegrationTest.setMinimumMasterNodes() helper function.
2014-03-17 10:37:56 +01:00
Boaz Leskes 6f0b15a27a [Test] IndexLifecycleActionTests - set minimum master node earlier to make sure it's in effect when needed. 2014-03-17 09:53:24 +01:00
David Pilato c6915ef4d6 Enforce java version 1.7
When building elasticsearch, we now require to use java 1.7.

Maven will check that before compiling any class. If Java version is incorrect, you will get the following message:

```
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.6.0-65 is not in the allowed range [1.7,).
```

Closes #5428.
2014-03-17 08:43:33 +01:00
Martijn van Groningen 9f52f755a3 [TEST] In PercolatorTests#testPercolateSorting_unsupportedField we need to be sure that the .percolator type exists 2014-03-17 10:50:57 +07:00
Martijn van Groningen b2a3904819 [TEST] Make sure that the facet fields exist. 2014-03-17 10:21:44 +07:00
Simon Willnauer ba8e34755f MulticastChannel returned wrong channel in shared mode
If the shared channel is used a wrong refrence was returned and
close calls couldn't find the listener since it go never registered
in that instance.
2014-03-16 18:19:21 +01:00
Simon Willnauer 43617cf5dc Count latch down if sendsPing throws exception
if the async sendPingsHandler throws an unexpected exception the
corresponding latch is never counted down. This might only happen
during node shutdown but can still cause starvation or test failures.
2014-03-16 16:08:36 +01:00
David Pilato f54e9246c1 Add _cat/plugins endpoint
If we want to have a full picture of versions running in a cluster, we need to add a `_cat/plugins` endpoint.

Response could look like:

```sh
% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
```

Closes #4824.
2014-03-16 12:16:09 +01:00
Simon Willnauer 965b85a663 [TEST] add mapping to MoreLikeThisActionTests to make sure doc mapper exists on all shards / nodes 2014-03-16 07:29:24 +01:00
Boaz Leskes 7f49d027b9 [Tests] RecoveryWhileUnderLoadTests - made sure background indexing threads are closed on errors.
Fixed minor logging discrepancies introduced with randomized shard count.
Added logging to recoverWhileUnderLoadWithNodeShutdown
Added logging ElasticsearchIntegrationTest.allowNodes to indicate what nodes were excluded.
recoverWhileRelocating's shard setting were potentially ignored (depending on key order in hashmaps)
2014-03-15 23:06:36 +01:00
EvanYellow 43b5d91de2 BulkProcessor process every n+1 docs instead of n
When you set a BulkProcessor with a bulk actions size of 100, it executes the bulk after 101 documents.

```java
BulkProcessor.builder(client(), listener).setBulkActions(100).setConcurrentRequests(1).setName("foo").build();
```

Same for size. If you set the bulk size to 1024 bytes, it will actually execute the bulk after 1025 bytes.

This patch fix it.

Closes #4265.
2014-03-15 12:32:09 +01:00
Clinton Gormley fb934aff57 [DOCS] Documented gateway.local.auto_import_dangled
Relates to #4996
2014-03-15 12:07:17 +01:00
Simon Willnauer 8bc73531c2 [TEST] Fix CircuitBreakerServiceTests from failing due to rounding errors 2014-03-14 23:19:23 +01:00
Bill Hwang fd89c66668 Remove PMD clone warning
Removed PMD clone warning on class ElasticsearchMergePolicy
2014-03-14 13:40:57 -07:00
Simon Willnauer b622fd18a2 Improve exception handling in HttpDownloadHelper 2014-03-14 21:11:40 +01:00
Simon Willnauer d670575d74 [TEST] Reduce iterations in RandomAllocationDeciderTests 2014-03-14 20:39:07 +01:00
Simon Willnauer b708ab3944 Add slop to prefix phrase query after parsing query string
This fixes a regression introduced by #5005 where the query slop
was simply ignored when a `match_phrase_prefix` type was set.

Closes #5437
2014-03-14 20:26:03 +01:00
Simon Willnauer aa654a26c9 Improve resource handling in Parent/ChildQuery 2014-03-14 20:18:09 +01:00
Simon Willnauer 821173b5cf Enforce query instance checking before it wrapper as a filter
We have the default QueryWrapperFilter as well as our custom one while
our wrapper is explicitly marked as no_cache such that it will never
be included in a cache. This was not consistenly used and caused several
problems during tests where p/c related queries were used as filters
and ended up in the cache. This commit adds the QueryWrapperFilter
ctor to the forbidden APIs to enforce the query instance checks.
2014-03-14 20:18:01 +01:00
rphadake 36a0cb99d7 [Doc] doc updates for date histogram interval
Close #5308
2014-03-14 18:55:32 +01:00
Adrien Grand 65d3b61b97 Add an option to force _optimize operations.
When forced, the index will be merged even if it contains a single segment with
no deletions.

Close #5243
2014-03-14 18:21:56 +01:00
markharwood b6dc7cecd5 Tidy significant terms warnings from Jenkins 2014-03-14 17:03:14 +00:00
Martijn van Groningen d73172c844 Also wrap p/c queries in CustomQueryWrappingFilter in the fquery qparser, because they otherwise p/c queries may work incorrectly. 2014-03-14 22:54:58 +07:00
Holger Hoffstätte 7b26e1fbf8 equals()/hashCode() & tests for ByteArrays to avoid materializing a
full byte[].

Fixes #5435
2014-03-14 16:32:03 +01:00
David Pilato 84b5b45644 Support externalValue() in mappers
Some mappers do not support externalValue() to be set. So plugin developers can't use it while building their own mappers.

Support added in this PR for:

* `BinaryFieldMapper`
* `BooleanFieldMapper`
* `GeoPointFieldMapper`
* `GeoShapeFieldMapper`

Closes #4986.
Relative to #4154.
2014-03-14 16:26:39 +01:00
Martijn van Groningen 6f80b7737a [TEST] Made sure that the parent exists (`foo` is the parent type and not `parent`) 2014-03-14 22:19:26 +07:00
Martijn van Groningen 7869562930 [TEST] Make sure that "assertNoFailures(searchResponse);" is used instead of "assertThat(searchResponse.getFailedShards(), equalTo(0));" to see what is failing.
Removed redundant "assertThat(searchResponse.getFailedShards(), equalTo(0));" checks
2014-03-14 22:13:18 +07:00
Shay Banon 3755f8e4df Allow to share multicast socket within jvm
Due to bugs in jvm (specifically OSX), running zen discovery tests causes for "socket close" failure on receive on multicast socket, and under some jvm versions, even crashes. This happens because of the creation of multiple multicast sockets within the same VM. In practice, in our tests, we use the same settings, so we can share the same multicast socket across multiple channels.
This change creates an abstraction called MulticastChannel, that can be shared, with ref counting. Today, the shared option is only enabled under OSX.
closes #5410
2014-03-14 14:58:05 +01:00
Adrien Grand b7de1becf4 Allow scripts to return more than 4 values in aggregations.
A missing call to ArrayUtil.grow prevented the array that stores the values
from growing in case the number of values returned by the script was higher
than the original size of the array.

Close #5414
2014-03-14 13:53:53 +01:00
David Pilato 2aaf81f8ef [TEST] pre check download service working
Seen during CI tests, it could appears that the download service is not available for any reason.

This fix in test will check before each test which requires an internet access (annotated with @Network) that the download service we are testing is still working.

It won't fail the test but will mark the test as `Ignored` in case of failure.
2014-03-14 13:22:38 +01:00
Adrien Grand eef71da650 [Doc] Add a chart about the relative error of the percentiles aggregation. 2014-03-14 12:23:23 +01:00
javanna d80dd00424 upgrade randomized-testing to 2.1.1
Note that the standard `atLeast` implementation has now Integer.MAX_VALUE as upper bound, thus it behaves differently from what we expect in our tests, as we never expect the upper bound to be that high.
Added our own `atLeast` to `AbstractRandomizedTest` so that it has the expected behaviour with a reasonable upper bound.
See https://github.com/carrotsearch/randomizedtesting/issues/131
2014-03-14 11:47:00 +01:00
markharwood 767bef0596 Significant_terms aggregation identifies terms that are significant rather than merely popular in a set.
Significance is related to the changes in document frequency observed between everyday use in the corpus and
frequency observed in the result set. The asciidocs include extensive details on the applications of this feature.

Closes #5146
2014-03-14 10:34:24 +00:00
Martijn van Groningen 6f8f773f8c Disabled query size estimation in percolator, because this is too expensive cpu wise.
Lucene's RamUsageEstimator.sizeOf(Object) is to expensive.
Query size estimation will be enabled when a cheaper way of query size estimation can be found.

Closes #5372
Relates to #5339
2014-03-14 15:29:24 +07:00
Adrien Grand a895349be5 [Test] Strengthen SimpleIndicesWarmerTests.testEagerLoading. 2014-03-14 09:26:56 +01:00
Martijn van Groningen 73383e2014 The p/c queries must always be wrapped in a CustomQueryWrappingFilter in fquery parser.
Also made assertions more descriptive when failing.
2014-03-14 14:12:05 +07:00
Martijn van Groningen bdfb59aa00 [TESTS] Specify unicast hosts and transport port range specifically 2014-03-14 10:51:34 +07:00
Igor Motov e029258fcf Add retry mechanism to get snapshot method
During snapshot finalization the snapshot file is getting overwritten. If we try to read the snapshot file at this moment we can get back an empty or incomplete snapshot. This change adds a retry mechanism in case of such failure.
2014-03-13 17:54:49 -04:00
Simon Willnauer 3bc6e834cd [TEST] Rewrite SearchStatsTests to not shut down nodes after indexing.
The test was shutting down nodes even if some of the inidces had only a
single shard. This caused that we basically had no shard active that
could sever the docs and caused random failures. This commit fixed the
test to rather allocate enough shards such that we never need to resize
the cluster which also makes the test faster.
2014-03-13 22:33:34 +01:00
Simon Willnauer 30ca937dbb [TEST] Stabelize ConcurrentPercolatorTests after # shard randomization 2014-03-13 21:09:13 +01:00
Simon Willnauer 10a1fcb65a [TEST] Add mapping to use an actual stopword analyzer
This test was added when the default  analyzer was filtering stopwords. But since
1.0 the default analyzer doesn't filter stopwords
2014-03-13 20:40:25 +01:00
Bill Hwang 2e56253293 Added static analysis profile to pom.xml
Added pmd, findbug as well as site generation logic to top pom.xml file
Created customized pmd ruleset
2014-03-13 12:23:07 -07:00
Adrien Grand 5821fa042c Cardinality aggregation.
This aggregation computes unique term counts using the hyperloglog++ algorithm
which uses linear counting to estimate low cardinalities and hyperloglog on
higher cardinalities.

Since this algorithm works on hashes, it is useful for high-cardinality fields
to store the hash of values directly in the index, which is the purpose of
the new `murmur3` field type. This is less necessary on low-cardinality
string fields because the aggregator is smart enough to only compute the hash
once per unique value per segment thanks to ordinals, or on numeric fields
since hashing them is very fast.

Close #5426
2014-03-13 19:19:56 +01:00
Adrien Grand 4e5714b31f Remove AggregationContext.cacheRecycler(). 2014-03-13 19:02:47 +01:00
Adrien Grand 40d67c7e09 Make aggregations CacheRecycler-free.
Aggregations were still using CacheRecycler on the reduce phase. They are now
using page-based recycling for both the aggregation phase and the reduce phase.

Close #4929
2014-03-13 16:15:38 +01:00
Simon Willnauer 8a1e77c50c Allow edit distances > 2 on FuzzyLikeThisQuery
Due to a regression edit distances > 2 threw exceptions after unifying
the fuzziness factor in Elasticsearch `1.0`. This commit brings back the
expceted behavior.

Closes #5292
2014-03-13 14:21:15 +01:00
javanna 20d5481ac6 [TEST] Randomized number of replicas used for indices created during tests
Introduced two levels of randomization for the number of replicas when running tests:

1) through the existing random index template, which now sets a random number of replicas that can either be 0 or 1 that is shared across all the indices created in the same test method unless overwritten

2)  through createIndex and prepareCreate methods, between 0 and the number of data nodes available, similar to what happens using the indexSettings method, which changes for every createIndex or prepareCreate unless overwritten (overwrites index template for what concerns the number of replicas)

Added the following facilities to deal with the random number of replicas:

- made it possible to retrieve how many data nodes are available in the `TestCluster`
- added common methods similar to indexSettings, to be used in combination with createIndex and prepareCreate method and explicitly control the second level of randomization: numberOfReplicas, minimumNumberOfReplicas and maximumNumberOfReplicas

Tests that specified the number of replicas have been reviewed:
- removed manual replicas randomization where present, replaced with ordinary one that's now available
- adapted tests that didn't need a specific number of replicas to the new random behaviour
- also done some more cleanup, used common methods like assertAcked, ensureGreen, refresh, flush and refreshAndFlush where possible
2014-03-13 12:52:41 +01:00