Commit Graph

8525 Commits

Author SHA1 Message Date
Adrien Grand d8f0f7077f [TEST] Use assertAllSuccessful instead of assertNoFailures in CompletionSuggestSearchTests. 2014-04-25 00:07:10 +02:00
Adrien Grand f1916d16dc [TEST] Fix typo in DateHistogramTests that fails the test since it expects dates to be rounded by day. 2014-04-24 23:25:23 +02:00
Adrien Grand f109802960 Remove java6ism in FSTBytesAtomicFieldData. 2014-04-24 22:41:12 +02:00
mikemccand ba73877580 Send Lucene's IndexWriter infoStream messages to Logger lucene.iw, level=TRACE
Lucene's IndexWriter logs many low-level details to its infoStream
which can be helpful for diagnosing; with this change, if you enable
TRACE logging for the "lucene.iw" logger name then IndexWriter's
infoStream output will be captured and can later be scrutinized
e.g. using https://code.google.com/a/apache-extras.org/p/luceneutil/source/browse/src/python/iwLogToGraphs.py
to generate graphs like http://people.apache.org/~mikemccand/lucenebench/iw.html

Closes #5891
2014-04-24 16:31:23 -04:00
javanna 9a68e60142 [TEST] Allow to disable randomization of shards and replicas via system property
Needed for REST backwards compatibility tests, since we need to run older tests with the latest runner, which randomizes shards and replicas, but the tests rely on defaults (5,1).

Done in a generic way based on compatibility versions e.g. `-Dtests.compatibility=1.0.0` allows to run tests in a special manner that is compatibile with 1.0.0 version.

Also moved back randomIndexTemplate to ElasticsearchIntegrationTest (from ImmutableCluster) where all the randomized aspects should be.

Closes #5897
2014-04-24 22:18:31 +02:00
Isabel Drost-Fromm dcfc7cead0 Add some more documentation to TemplateQueryParser
Relates to #4879
2014-04-24 22:11:17 +02:00
mikemccand 84af7d9f9a test was missing tie-break for the two suggestions 2014-04-24 15:42:08 -04:00
Clinton Gormley c1e03bf860 Update keyword-repeat-tokenfilter.asciidoc 2014-04-24 16:44:02 +02:00
Britta Weber e84d3111a3 Revert "Throw exception if decay is requested for a field with multiple values"
This reverts commit 95d781510f.

see https://github.com/elasticsearch/elasticsearch/issues/3960#issuecomment-41279373
2014-04-24 15:46:48 +02:00
Britta Weber 95d781510f Throw exception if decay is requested for a field with multiple values
closes #3960
2014-04-24 15:18:39 +02:00
Adrien Grand 0631b6a042 [TEST] DisabledFieldDataFormatTests assumes a single replica. 2014-04-24 14:16:07 +02:00
Adrien Grand d792d14926 Instantiate facets/aggregations during the QUERY phase.
In case of a DFS_QUERY_THEN_FETCH request, facets and aggregations are currently
instantiated during the DFS phase while they only become useful during the QUERY
phase. By instantiating during the QUERY phase instead, we can make better use
of recycling since objects will have a shorter life out of the recyclers.

Close #5821
2014-04-24 11:48:36 +02:00
Adrien Grand d8880f2906 Fail a DFS_QUERY_THEN_FETCH request if all shards failed the QUERY phase.
Today, if some shards pass the DFS phase but all of them fail the QUERY phase,
the response will only consist of failed shards. We should throw an exception
instead in order to be consistent with the QUERY_THEN_FETCH type.
2014-04-24 11:48:24 +02:00
Adrien Grand cb8139a583 Remove abstraction in the percentiles aggregation.
We initially added abstraction in the percentiles aggregation in order to be
able to plug in different percentiles estimators. However, only one of the 3
options that we looked into proved useful and I don't see us adding new
estimators in the future.

Moreover, because of this, we let the parser put unknown parameters into a hash
table in case these parameters would have meaning for a specific percentiles
estimator impl. But this makes parsing error-prone: for example a user reported
that his percentiles aggregation reported extremely high (in the order of
several millions while the maximum field value was `5`), and the reason was that
he had a typo and had written `fields` instead of `field`. As a consequence,
the percentiles aggregation used the parent value source which was a timestamp,
hence the large values. Parsing would now barf in case of an unknown parameter.

Close #5859
2014-04-24 09:44:36 +02:00
Adrien Grand b3e0e58094 Field data diet.
We have lots of unused, or almost unused methods in our field data impls,
especially when dealing with ordinals. Let's nuke them.

Close #5874
2014-04-24 09:14:09 +02:00
Lee Hinman 54612ee2b5 Add REST API spec for /_search_shards endpoint
Also adds REST test for /_search_shards

Closes #5907
2014-04-23 13:29:29 -06:00
Shay Banon 0a84253045 [TEST] add a test that explicitly verifies no duplicates are created
we do this test in other places in ES, but no dedicated test for it. This test was born out of the auto generate id work, but we should have this test regardless if it gets in or not
2014-04-23 21:13:12 +02:00
Clinton Gormley 39705aa236 [DOCS] rewrite -> fuzzy_rewrite in match query
Fixed typo
2014-04-23 21:05:14 +02:00
Lee Hinman b5adc877ca Include name of the field that caused a circuit break in the log and exception message
Fixes #5718
Closes #5841
2014-04-23 09:54:00 -06:00
javanna 6eb655380c [TEST] Randomized number of replicas between 0 and the number of data nodes - 1 (rather than just between 0 and 1)
Closes #5896
2014-04-23 17:46:35 +02:00
mikemccand 3e63d530f8 Closes #5882 2014-04-23 10:42:41 -04:00
Simon Willnauer b36ef995bb Change default recovery throttling to 50MB / sec
The current setting of 20MB/sec seems to be too conservative given
the capabilities of modern hardware / network throughput.
A 50MB default should provide better out of the box performance.
2014-04-23 15:40:21 +02:00
Robert Muir 8568c18e6f Change default numeric precision_step
Change the default numeric precision_step to 16 for 64-bit types,
8 for 32-bit and 16-bit types. Disable precision_step for the 8-bit
byte type.

Closes #5905
2014-04-23 09:01:25 -04:00
Martijn van Groningen f8d35d81d8 Re-order log statements to be correct for segment and top level warming. 2014-04-23 17:13:44 +07:00
Clinton Gormley 640085c45d Disable benchmark tests until nodes set to run with
-Des.node.bench=true
2014-04-22 21:16:46 +02:00
Simon Willnauer b4f0603169 Change default merge throttling to 50MB / sec
The current setting of 20MB/sec seems to be too conservative given
the capabilities of modern hardware. Even on cloud infrastructure this
seems to be too lowish. A 50MB default should provide better out of the box
performance
2014-04-22 21:08:40 +02:00
Clinton Gormley eccbd911de [SPEC] Added path without scroll_id to clear_scroll 2014-04-22 19:38:55 +02:00
Binh Ly 1746f2f792 [DOCS] getting started tutorial 2014-04-22 13:33:03 -04:00
Clinton Gormley e2b4fbd1b1 [SPEC] The scroll_id is no longer a required qs param
Can be passed in the body instead
2014-04-22 19:30:51 +02:00
Clinton Gormley 2423c8c57a [SPEC] Added missing list_benchmarks test 2014-04-22 19:27:37 +02:00
Clinton Gormley 5d7263b69e [SPEC] Renamed benchmark endpoints
benchmark.submit -> benchmark
benchmark.list   -> list_benchmarks
benchmark.abort  -> abort_benchmark

And fixed the related tests
2014-04-22 19:14:26 +02:00
Lee Hinman 029b13cf68 Parse has_child query/filter after child type has been parsed
Fixes #5783
Fixes #5838
2014-04-22 09:29:48 -06:00
Shay Banon 8136a38b3f Improved bloom filter hashing
Make improvements to how bloom filter hashing works based on guava 17 upcoming changes, see more here (https://code.google.com/p/guava-libraries/issues/detail?id=1119)
In order to do it, introduce a hashing enum, and use the (unused until now) hash type serialization to choose the correct hashing used based on serialized version.
Also, move to use our own optimized murmur hash for the new hashing logic.
2014-04-22 17:17:25 +02:00
Lee Hinman 57bee03193 [DOCS] Add /_search_shards documentation 2014-04-22 08:54:32 -06:00
Simon Willnauer cb9f7c1da5 [TEST] Randomize translog setting per index 2014-04-22 16:41:00 +02:00
Simon Willnauer 1cf62e7782 Use unlimited flush_threshold_ops for translog
Currently we use 5k operations as a flush threshold. Indexing 5k documents
per second is rather common which would cause the index to be committed on
the lucene level each time the flush logic runs which is 5 seconds by default.
We should rather use a size based threshold similar to the lucene index writer
that doesn't cause such agressive commits which can slow down indexing significantly
especially since they cause the underlying devices to fsync their data.
2014-04-22 16:37:07 +02:00
Clinton Gormley 3ba8fbbef8 Update benchmark.asciidoc
Fixed incorrect parameter spec for benchmark nodes
2014-04-22 14:16:10 +02:00
Boaz Leskes 1434f6bcbb A new ClusterStateStatus to indicate cluster state life cycles
When the ClusterService applies a new cluster state, it is first assigned as the new active one and then all listeners are called. Some of ES's features sample the current state and try to take action on it (for example index a document). If that fails, they will wait for change in the cluster state and try again (for example, wait for a shard to start and try indexing again).

If you're unlucky you sample the state after it has been assigned as the "active" state but before all listeners has done the work. In this cases the action take (i.e., indexing a doc) will still fail (as the shard is not yet started) but waiting for a new state may take a long time or fail.

This commit adds a new ClusterStateStatus that allows to better track the stages a cluster state goes through (currently `RECEIVED`, `BEING_APPLIED` & `APPLIED`). This allows detecting that a cluster state is not yet fully applied and retry without waiting for a new state to arrive.

This commit also adds a utility class , ClusterStateObserver, to make this pattern slightly simpler and avoid common pit falls.

Closes #5741
2014-04-22 10:14:41 +02:00
Simon Willnauer 41cc1f5bcb [TEST] Ensure that iteration order of TestSection is consistent 2014-04-22 10:06:58 +02:00
Simon Willnauer ae911f6e75 [TEST] Remove ambigious 4th suggestion - order differs slightly on Java 8 2014-04-22 10:00:02 +02:00
javanna 918da65d35 [TEST] Added blacklist to be able to skip specific REST tests
The blacklist can be provided through -Dtests.rest.blacklist and supports a comma separated list of globs
e.g. -Dtests.rest.blacklist=get/10_basic/*,index/*/*

Also added some missing docs and made it clearer that the suite/test descriptions effectively contains their (relative) path (api/yaml_file/test section)

Closes #5881
2014-04-22 09:52:48 +02:00
Andrew Selden 3121ad20dd Return valid empty JSON response when no recovery information
This is a fix to send back to the client a valid empty JSON response in
the case when we have no recovery information.

Closes #5743
2014-04-21 16:52:25 -07:00
Andrew Selden 1f7f72135a Bug fix for hung clients on cluster without benchmark nodes
This is a fix for a bug whereby a cluster that has no nodes started with
-Des.node.bench=true will cause clients to hang if they attempt to
submit a benchmark.

Also adds REST tests to validate fix

Closes #5754
2014-04-21 15:08:50 -07:00
Shay Banon 2f8fc98012 [TEST] make fetch time in millis test more resilient
beef up the fetch work, and increase teh number of iterations (since we count in nanos, but reports in rounded millis)
2014-04-22 00:00:08 +02:00
Shay Banon aa86a51070 Use loopback when localhost is not resolved
we use the "local host" address in sevearl places in our networking layer, if local host is not resolved for some reason, still continue and operate but using the loopback interface
2014-04-21 20:55:03 +02:00
Simon Willnauer f26e9e784f Searcher might not be closed if store hande can't be obtained
Today we first get a reference to the IndexSearcher in #acquireSearcher
and then futher down we try to run Store#incRef() which might throw an
exception if the store is already closed. There is a small window
that allows this to happen during InternalEngine#close() when we try
to acquire the searcher at the same time and the engine is the last
resource that holds a reference to the store.

This commit only affects unreleased code since the Store's ref counting
has not yet been released.
2014-04-21 20:45:38 +02:00
Clinton Gormley 0e782331be Update benchmark.asciidoc 2014-04-21 20:39:33 +02:00
Boaz Leskes baea1827d1 [Tests] SimpleRecoveryLocalGatewayTests.testSingleNodeNoFlush could fail if shards were not started
The test starts a single node, indexes into, restarts the node and checks that no data was lost. It only indexed into 2 shards and didn't wait for green meaning that the node could be restarted with non-started primary. In that case the node will not re-assign the primary as it was not started. This commit makes sure that we either wait for primaries to start or index into all shards which has the same net effect.

Also extending some logging in InternalIndexShard.
2014-04-21 11:44:16 +02:00
Samuel Molinari 909cf4de44 Update function-score-query.asciidoc 2014-04-20 13:39:32 +02:00
David Pilato f3fe50aac4 [DOCS] fix typo 2014-04-19 22:44:44 +02:00