Commit Graph

5309 Commits

Author SHA1 Message Date
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
Shay Banon 3d0382b562 better handling of failures in transport to catch assertions
move wrapping the stream into the try block, even though its unlikely they will throw a failure, better be safe...
2013-07-26 12:27:55 +02:00
Cédric HOURCADE 5022c4659c Add a "score_mode" parameter to rescoring query.
Default value is "total", possible values are: "max", "min", "avg",
"multiply" and "total".

- "total": the final score of a document is the sum of the original
  query score with the rescore query score.
- "max": only the highest score count.
- "min": only the lowest score is kept (if the document doesn't match
  the rescore query, the original query score is used).
- "avg": average of both scores
- "multiply": product of both scores

Closes #3258
2013-07-26 12:10:01 +02:00
Shay Banon 29d337c44b better handling of failures in transport to catch assertions
make sure we also catch assertions (well Throwable) in our transport layer and properly log or callback the exception handler in that case
2013-07-26 12:00:52 +02:00
Simon Willnauer 68ce3eff04 Fixed test that relied on internal document ordering.
Lucene might internally tie-break on low level doc-Ids which
can change depending on merges etc. and test timings. No test should
rely on the actual order if scores are identical.
2013-07-26 10:39:50 +02:00
Shay Banon 861e33ee3d fix test to use correct store setting 2013-07-25 20:31:16 +02:00
Simon Willnauer 3268f57125 Math is as hard as Concurrency 2013-07-25 18:36:15 +02:00
Shay Banon 0e303840e8 0.90.3 uses lucene 44 2013-07-25 18:34:02 +02:00
Luca Cavanna cb32841d9a Added regression tests for #3381 2013-07-25 18:30:49 +02:00
Martijn van Groningen bb43636190 break out if there no more liveIds. This can happen if another thread emptied the liveIds. 2013-07-25 18:18:41 +02:00
Martijn van Groningen 60f095bb72 Can't share XContentBuilder across threads. 2013-07-25 18:01:38 +02:00
Luca Cavanna 1a352756e0 Fixed hang when submitting mappings and no changes are made
Added missing listener call before return

Closes #3381
2013-07-25 16:20:56 +02:00
Simon Willnauer bd466fe39d Add facility to index in random order
Tests are more reproducible if documents are indexed in random order
with random flushes/refreshes etc. in order to catch corner cases
where doc Ids are used for tie-breaking and tests rely on a certain
order.
2013-07-25 15:17:08 +02:00
Simon Willnauer eaa6bebe54 Fix CustomScoreSearchTest that assumed a certain order of doc IDs with equal score 2013-07-25 13:04:23 +02:00
Simon Willnauer 02ca879f5d Generate consistent random settings across nodes
IndexGatewayTests rely on that all nodes have the same type of
storage to pass consistently. Random configs should be the same for all
nodes in the cluster.
2013-07-25 09:35:46 +02:00
Lukas Vlcek 4f0080b206 Expose recursion level for Hunspell token filter. Closes #3369 2013-07-25 09:17:31 +02:00
Simon Willnauer 6101cbf2bf Fix test that assumed a certain order of doc IDs with equal score
If the score is equal in Lucene the order of the result depends on the
actual global doc ID such that due to background merges or concurrency
these test can return different result set orders.
2013-07-25 08:14:20 +02:00
Shay Banon 50a835d38b Mapping: Allow to update/merge the dynamic flag
Allow to update / merge in the dynamic flag on object or the root object mapper, meaning that it can be changed dynamically using the update mapping API.
closes #3384
2013-07-24 22:57:08 +02:00
Shay Banon 993fad4c33 process internal refresh/update mapping events per index
this allows us to only create the index (if needed) for the exact duration it is needed, and not across processing of all the events
2013-07-24 21:34:33 +02:00
Martijn van Groningen 426c2867d9 Fixed testConcurrentAddingAndRemovingWhilePercolating test 2013-07-24 20:49:07 +02:00
Shay Banon 70bbcb4c48 Add Git build info when we build a distribution
closes #3370
2013-07-24 20:24:23 +02:00
Shay Banon 646ab22e3a only process an internal refresh mapping once
we only need to process a refresh on an index/type tuple once even if there are several pending, optimize to not do it several times
2013-07-24 19:12:21 +02:00
Simon Willnauer 08697b2ba8 Fix test-bug that produced ordinals with gaps 2013-07-24 18:04:54 +02:00
Shay Banon 6da558f81f extra space... 2013-07-24 17:51:18 +02:00
Shay Banon 9f57f26be4 make base classes tests abstract
(for intellij)
2013-07-24 17:28:51 +02:00
Shay Banon a3c3d4073b use host address instead of host name in tests to not do host lookup 2013-07-24 17:22:18 +02:00
Simon Willnauer ed473e272d Cut over to JUnit & Randomized Runner from TestNG
For better integration with the Lucene Test Framework and the
availabilty of RandomizedRunner / Randommized Testing this commit
moves over from TestNG to JUnit.
This commit also moves relevant places over to RandomzedRunner for
reproduceability and removes copied classes from the Lucene Test
Framework.
2013-07-24 16:59:36 +02:00
Martijn van Groningen 5de9877405 We should wait until the first blocking task is actual being executed.
The pending tasks can be returned out of order.
2013-07-24 15:59:01 +02:00
Shay Banon d67b8f1310 don't xcontent locale if its ROOT for date since its the default 2013-07-24 12:47:22 +02:00
Boaz Leskes 497032e6e7 FuzzyLikeThisFieldQueryBuilder now defaults failOnUnsupportedField to true, to be consistent with REST API.
Closes #3374
2013-07-24 09:54:23 +02:00
Shay Banon b85bcde640 better logging on failure to create index
if the index already exists, trace log it, since it might happen as a result of multiple index requests at the same time creating the index, all other ones, should be debug and not warn in the same spirit of other APIs
2013-07-24 01:58:31 +02:00
Shay Banon bb6df34671 bulk refresh and update mapping cluster events
try and bulk as much as possible refresh and update mapping events, so they will all be processed at a single go, resulting in less cluster change events, and also reduce the load of multiple changes to the same index
also, change the prio for those to HIGH, since we want URGENT ones (like create index, delete index) to execute
2013-07-24 01:58:11 +02:00
Shay Banon 6a5d2bf767 remove cached stream output
start to build the infra for simpler migration to netty 4, starting with removing the cache stream output handling as it will come built in
2013-07-23 15:56:48 +02:00
Martijn van Groningen b52243cdc2 Added cluster pending tasks api.
Closes #3368
2013-07-23 15:33:29 +02:00
Simon Willnauer 69a7f8d71d Removed XPatternCaptureGroupTokenFilter 2013-07-23 13:55:20 +02:00
Simon Willnauer 2e9851138e Upgrade to Lucene 4.4 2013-07-23 13:55:15 +02:00
Shay Banon 92a7030558 Add optimize thread pool (size 1) dedicated to perform explicit optimize API
Have a dedicated thread pool for explicit optimize calls (shard level optimize operations). By default, the size should be 1 to work the same with how things work currently allowing for only 1 shard level optimize on a node.

The change allows to see the optimize thread pool stats now, and potentially increase the thread pool size for beefy machines.

closes #3366
2013-07-23 11:05:15 +02:00
Shay Banon f9ce791578 make sure we update last failure 2013-07-23 10:54:42 +02:00
Martijn van Groningen aa5c15a1d7 Wait a bit longer for ttl to have occurred 2013-07-23 00:29:11 +02:00
Martijn van Groningen 18141b8da0 Fix SimplePercolatorTests#testPercolateStatistics 2013-07-23 00:10:27 +02:00
Shay Banon 4930b93c26 move master actions to accept a lister, improve cluster service state execution
- master actions many times end up being executed on the cluster service, so there is no need to block them on the management thread pool to wait for a response, this remove the load on the management thread pool, and also simplifies the code implementing it
- cluster service state update exception handling was improved to include a callback when a failure happens during state update execution, this makes sure that we catch all relevant exceptions and invoke the callback, as well as simplify the code of cluster state update tasks, as they can throw failures from within the execute method and then handle them properly
2013-07-23 00:08:45 +02:00
Adrien Grand e943cc81a5 Add FastVectorHighlighter support for more complex queries.
FastVectorHighlighter fails at highlighting some complex queries such as
multi phrase queries which have two terms at the same position. This can be
easily triggered by running a `match_phrase` query with an analyzer which
outputs synonyms such as SynonymFilter or WordDelimiterFilter.

Close #3357
2013-07-22 19:43:22 +02:00
Shay Banon 6b21414520 should be 500... 2013-07-22 17:53:44 +02:00
Shay Banon c766f6bd97 Cluster State Update APIs (master node) to respect master_timeout better
also respect the timeout when trying to obtain the md lock
relates #3365
2013-07-22 17:53:18 +02:00