Commit Graph

5302 Commits

Author SHA1 Message Date
Alexander Reelsen 5cd01461f6 Improving test CompletionSuggestSearch test stability
Ensuring that the maximum number of replicas is less than the number of nodes.
2013-08-01 10:14:18 +02:00
Alexander Reelsen 4f4f3a2b10 Added prefix suggestions based on AnalyzingSuggester
This commit introduces near realtime suggestions. For more information about
its usage refer to github issue #3376

From the implementation point of view, a custom AnalyzingSuggester is used
in combination with a custom postingsformat (which is not exposed to the user
anywhere for him to use).

Closes #3376
2013-08-01 08:44:09 +02:00
Shay Banon fd15b6278b Query/Filter Facet should support 64bit counter, not 32
closes #3419
2013-07-31 22:10:43 +02:00
Shay Banon e3480a1c0a Reroute eagerly on shard started events
We have an optimization where we try to delay reroute after we processed the shard started events to try and combine a few into the same event. With teh queueing of shard started events in places, we don't need to do it, and we can reroute right away, which will actually reduce the amount of cluster state events we send.

This will also have a nice side effect of not missing on "waitForRelocatingShards(0)" on cluster health checks since relocations will happen right away.

closes #3417
2013-07-31 16:58:26 +02:00
Luca Cavanna 2f8a397aa5 Improved test
- checking routing table taken from same (up-to-date) cluster state
- added @Slow annotation
- forced cluster reroute when needed
- changed order of assertions so that if it fails again it's easier to understand why
2013-07-31 14:26:44 +02:00
Shay Banon 433f0cc86c process deleted index events on a node even if it has no local FS
this will not happen now, but in the future, if data nodes will only be in memory (including translog and such), then we need to fire the deleted events
2013-07-31 13:59:53 +02:00
Adrien Grand 420a3ed691 Forbid usage of StringReader in favor of FastStringReader.
StringReader is synchronized although input streams should always be consumed
by a single thread at a time. FastStringReader on the other hand is completely
thread unsafe.

Closes #3411
2013-07-31 09:34:18 +02:00
Shay Banon 813e3557ab don't call the refresh mapping listener callback twice
though not harmful, results in an annoying transport service log
2013-07-30 23:41:32 +02:00
Peter Moberg 95855c515b auto_expand_replicas causing very large amount of cluster state changes when a node joins or leaves the cluster
Closes #3399
2013-07-30 16:20:18 -04:00
Shay Banon 0e3c67cbf8 Delete API ack to wait also for actual deletion of shards from disk
closes #3413
2013-07-30 18:58:28 +02:00
Boaz Leskes 61036390e2 removed a left over assert made redundant by last commit 2013-07-30 17:39:38 +02:00
Boaz Leskes 925203b9c1 ElasticsearchAssertions.assertHitCount variants now report shard failure upon fail.
Cleaned up a UpdateNumberOfReplicasTests a bit.
2013-07-30 17:22:53 +02:00
Adrien Grand daf7e04caf Use Analyzer.tokenStream(fieldName, text) instead of Analyzer.tokenStream(fieldName, new StringReader(text)).
Lucene 4.4 introduced the tokenStream(String fieldName, String text) helper
method which nicely reuses the string reader. Whenever analyzing Strings, we
should use this method instead of using the Reader method with a
(Fast)StringReader.

Closes #3409
2013-07-30 17:18:08 +02:00
Martijn van Groningen a235a55943 Improved how aliases are handled in the cluster state.
The following changes improved alias creation:
* Moved away from ImmutableMap to JCF's UnmodifiableMap. The ImmutableMap always made a copy, whereas the UnmodifiableMap just wraps the target map.
* Reducing the number of maps being created during the creation of MetaData and IndexMetadata.
* Changed IndexAliasesService's aliases from a copy on write ImmutableMap to ConcurrentMap.

Closes #3410
2013-07-30 17:07:21 +02:00
Shay Banon 33d8571d1e make sure we wrap a potential failure in sending master state change in a catch 2013-07-30 16:44:30 +02:00
Boaz Leskes 668d55758b Added source fetching and filtering parameters to search, get, multi-get, get-source and explain requests
Closes #3301
2013-07-30 13:21:14 +02:00
Luca Cavanna bcbd67feab Solved test timing issue and removed meaningless test 2013-07-30 13:16:57 +02:00
Boaz Leskes 59a9a0d3ef Ported an 0.90 branch excplicit test for dynamic update of gc_delete setting for RobinEngine.
This issue is already solved in master.

See #3396
2013-07-30 12:55:14 +02:00
Shay Banon 07569b4808 warmer test to use 0 replicas
they are meaningless in the context of the test, should stabilize it
2013-07-30 10:47:16 +02:00
Martijn van Groningen 4724725681 Made a clear distinction in the rest api between percolating a provided document and percolating an existing document. The latter is now a separate api. 2013-07-30 10:25:42 +02:00
Martijn van Groningen ef847da2cd Lowered the default size of the percolate thread pool 2013-07-30 09:48:05 +02:00
Martijn van Groningen 7ccc968a9f Moved node level classes classes out of the index.percolator package into toplevel percolator package. 2013-07-29 17:40:07 +02:00
Martijn van Groningen 3f6877ec2b Rewrote the percolate existing doc api.
The percolate existing doc feature now reuses the get request instead of having a separate request body.
Relates to #3380
2013-07-29 17:32:26 +02:00
Martijn van Groningen a9dd3c9756 Added version support to mget and get apis, that only will perform the get operation if the version of the document to be fetched matches with the provided version.
Both get and mget apis now support the following additional parameters: `version` and `version_type`.

Closes #3404
2013-07-29 15:53:12 +02:00
Luca Cavanna 3b2a9fc86b completed renaming of MetaDataStateIndexService to MetaDataIndexStateService 2013-07-29 15:46:50 +02:00
Luca Cavanna 8eed6cdcae Renamed MetaDataStateIndexService to MetaDataIndexStateService for consistency 2013-07-29 15:12:09 +02:00
Luca Cavanna 105d4bab5f Updated test to reflect added acknowledgement from all nodes in open/close index api
If it's acknowledged all the other nodes already hold the latest cluster state, thus we can search on the closed index and be sure we get an error back
2013-07-29 15:12:08 +02:00
Luca Cavanna c23c5d2494 Added support for acknowledgement from other nodes in open/close index api
The open/close index api now waits for an acknowledgement from all the other nodes before returning its response, till the timeout (configurable, default 10 secs) expires. The returned acknowledged flag reflects whether the cluster state change was acknowledged by all the nodes or the timeout expired before.

Closes #3400
2013-07-29 15:12:08 +02:00
Boaz Leskes e0e6a58357 FuzzLikeThis*QueryBuilder and MoreLikeThis*QueryBuilder do not send failOnUnsupportedField if not explicitly specified.
Closes #3402 , a better solution to #3374
2013-07-29 15:02:42 +02:00
Shay Banon 7fd54acd66 remove our own version of highlighting boundary scanner
the bug that we fixed in it was already pushed to the lucene version
2013-07-29 13:36:21 +02:00
Shay Banon fadb0c8f32 cleanup unused classes (not needed with Lucene 4.4) 2013-07-29 12:58:09 +02:00
Shay Banon 2c2cc844dc cleanup deprecations / warnings 2013-07-29 01:55:41 +02:00
Shay Banon 4e66658aac cleanup
- remove Digest/Hex, only used in test, directly use MD5 there
- don't use Closeables and use IOUtils
- remove duplicate Classes usage and unused LongsLAB
2013-07-29 01:29:58 +02:00
Shay Banon a1197de6af remove unused class 2013-07-29 01:08:08 +02:00
Shay Banon 94c8834dd3 remove RandomStringGenerator, using random strings from randomized testing 2013-07-29 01:06:09 +02:00
Shay Banon d2842a936e use BigDoubleList on all cases of geo point field data
same with other field data implementations, prefer to use the paged list compared to single long array in all cases
2013-07-29 00:20:37 +02:00
Shay Banon e4ad92203f remove RamUsage and use Lucene one 2013-07-29 00:02:42 +02:00
Shay Banon 22085cab0b wait till connection callback have executed on setup 2013-07-28 22:50:46 +02:00
Shay Banon 7590f9f8a5 move char array caching to streams 2013-07-28 22:43:35 +02:00
Shay Banon da3b4a3bf0 don't use guava ordering sorted copy, since it does 2 copies (instead of 1)
simply use regular toArray and sort on it (we do need to copy it)
2013-07-28 20:09:14 +02:00
Shay Banon 69c9a2dca1 improve test to be more descriptive when it fails 2013-07-28 19:36:02 +02:00
Shay Banon 29cf346f13 improve test
the test checks that even though some shards might not be active, search will still work
2013-07-28 15:23:41 +02:00
Shay Banon c30fa15ddf randomize ports on specific transport and disco tests 2013-07-28 14:45:52 +02:00
Shay Banon 28a4ac01e4 fix transport support for versioning
when starting the request/response cycle, we should use the lowest version out of the current node version, and the target node version to serialize the request, and put it in the header. this will allow to support both backward and forward comp.
in addition, have Version as an injected value to different services, to make different versions more easily testable, compared to using Version#CURRENT
2013-07-27 22:14:04 +02:00
Nik Everett 6b8123d726 Don't allow unallocated indexes to be closed.
Closes #3313
2013-07-26 16:08:18 -04:00
Shay Banon 976152b23e enable sys out check + remove unused code 2013-07-26 18:57:21 +02:00
Shay Banon 8ac77b6119 cleanup signatures file 2013-07-26 18:32:51 +02:00
Martijn van Groningen ebad9e57d4 Added support for percolating an existing document.
The percolate an existing document feature executes an internal get operation to get the source of the document to percolate.

All options for percolating an existing document:
* `id` - The id of the document to percolate.
* `type` - The type of the document to percolate.
* `index` - The index to fetch the document to percolate from.
* `routing` - The routing value to use to retrieve the document to percolate.
* `preference` - Which shard to prefer (defaults to `_local`).
* `version` - Enables a version check. If the fetched document's version isn't equal to the specified version then the request fails with a version conflict and the percolation request is aborted.

All the option can be specified inside the `get` body part or via query string arguments.
Internally the percolate api will issue a get request for fetching the`_source` of the document to percolate.

For this feature to work the `_source` for documents to percolate need to be stored.

Closes #3380
2013-07-26 16:39:17 +02:00
Shay Banon cc5998bf6d pass the codec to fix index
its not used in Lucene fix index implementation, but just in case, pass it because we can (tm).
2013-07-26 15:36:30 +02:00
Martijn van Groningen 8fa54b59fb Only check if ttl purger has deleted the docs when the delete count in indexing stats has been increased. 2013-07-26 14:06:59 +02:00