Commit Graph

8312 Commits

Author SHA1 Message Date
Clinton Gormley f950344546 [DOCS] Fixed title levels in context suggester 2014-05-21 20:47:25 +02:00
Alex Ksikes a29b4a800d More Like This Query: replaced 'exclude' with 'include' to avoid double negation when set.
Closes #6248
2014-05-21 18:45:03 +02:00
Britta Weber 8cca9b28df Percolator: Fix assertion in percolation with nested docs
Assertion was triggered for percolating documents with nested object
in mapping if the document did not actually contain a nested object.
Reason:
MultiDocumentPercolatorIndex checks if the number of documents is
actualu >1. Instead we can just use the SingleDocumentPercolatorIndex
in this case.

closes #6263
2014-05-21 18:17:36 +02:00
Simon Willnauer 17d34d5c97 Fix FieldDataWeighter generics to accept RamUsage instead of AtomicFieldData
The `FieldDataWeighter` allowed to use a concrete subclass of the caches
generic type to be used that causes ClassCastException and also trips the
CirciutBreaker to not be decremented appropriately.

This was tripped by settings randomization also part of this commit.

Closes #6260
2014-05-21 17:50:45 +02:00
Lee Hinman 03402c7ed8 [TEST] prevent dummy documents from being indexed in testSimpleQueryString() since scores are compared 2014-05-21 17:37:54 +02:00
Martijn van Groningen a6b0b80f3d [TEST] Added test for #6256 2014-05-21 16:17:03 +02:00
Adrien Grand 34f7bd1ca4 Fail queries that have two aggregations with the same name.
Close #6255
2014-05-21 15:11:23 +02:00
Simon Willnauer f29744cc2f XFilteredQuery default strategy prefers query first in the deleted docs case
Today we check if the DocIdSet we filter by is `fast` but the check fails
if the DocIdSet if wrapped in an `ApplyAcceptedDocsFilter` which is always
the case if the index has deleted documents. This commit unwraps
the original DocIdSet in the case of deleted documents.

Closes #6247
2014-05-21 13:04:41 +02:00
Adrien Grand fa3bd738ab Remove `DocIdSets.isFastIterator(DocIdSetIterator iterator)`.
This method was unused and its implementation wasn't correct since FixedBitSet
has its own iterator since Lucene 4.7.
2014-05-21 11:25:35 +02:00
Alexander Reelsen 814451f499 [BUILD] Fixed release notes script to work with github API again 2014-05-21 11:14:28 +02:00
Simon Willnauer ec3b1c57ac Move Benchmark release to 1.3 2014-05-21 10:17:59 +02:00
Simon Willnauer a60dabdf0c [TEST] skip benchmark tests for now 2014-05-20 22:21:37 +02:00
Martijn van Groningen 9494bbd9b7 Verify that the current node is still master before the reroute is executed and if that isn't the case skip reroute
Invoke listener when reroute fails.

Closes #6244
2014-05-20 18:29:06 +02:00
Simon Willnauer 0e445d3aaf [TEST] Wait for all benchmarks to be started if more than one is used 2014-05-20 17:17:25 +02:00
Simon Willnauer 75efa47d5a [TEST] Allow to disable plugin loading from classpath 2014-05-20 16:31:32 +02:00
mikemccand 9c45fe8f9b Don't use AllTokenStream when no fields were boosted
AllTokenStream, used to index the _all field, adds some overhead, but
it's not necessary when no fields were boosted or when positions are
not indexed the _all field.

Closes #6187 Closes #6219
2014-05-20 10:28:31 -04:00
Andrew Selden 476e28f4ce Benchmark abort accepts wildcard patterns
This adds support for sending a list of benchmark names and/or wildcard
patterns when submitting an abort request. Standard wildcards such as:
"*", "*xxx", and "xxx*" are supported. Multiple benchmark names and
wildcard patterns can be submitted together as a comma-separated list
from the REST API or as a string array from the Java API.

Closes #6185
2014-05-20 16:00:11 +02:00
Simon Willnauer e47ee6f683 [TEST] Disable dummy documents for QueryRescorerTests#testEquivalence 2014-05-20 15:52:00 +02:00
Igor Motov 91c7892305 Add ability to snapshot replicating primary shards
This change adds a new cluster state that waits for the replication of a shard to finish before starting snapshotting process. Because this change adds a new snapshot state, an pre-1.2.0 nodes will not be able to join the 1.2.0 cluster that is currently running snapshot/restore operation.

Closes #5531
2014-05-20 08:57:21 -04:00
Boaz Leskes 05d131c39d Before deleting a local unused shard copy, verify we're connected to the node it's supposed to be on
This is yet another safety guard to make sure we don't delete data if the local copy is the only one (even if it's not part of the cluster state any more)

Closes #6191
2014-05-20 11:16:13 +02:00
Boaz Leskes 541acc7e9b Honor time delay when retrying recoveries
In some places we want to delay the start of a shard recovery because the source node is not ready to receive. At the moment the retry logic ignores the time delay parameter (`retryAfter`) causing a busy waiting like scenario. This is fixed in this commit.

Closes #6226
2014-05-20 11:03:14 +02:00
Simon Willnauer 223550bf3c [TEST] Opt out of dummy documents where scores are relevant. 2014-05-20 10:26:50 +02:00
Simon Willnauer ac28557228 [TEST] Provide overloaded indexRandom to opt out of dummy documents 2014-05-20 10:20:31 +02:00
Clinton Gormley 0741ce3684 CharArraySet doesn't know how to lookup the original string
in an ImmutableList.

Closes #6237
2014-05-19 21:27:04 +02:00
Simon Willnauer 57316bbfb3 Remove obsolet ASF repository Lucene 4.8.1 is on maven central 2014-05-19 21:17:33 +02:00
Simon Willnauer 7d76548a1a Added Version [1.3.0] 2014-05-19 20:55:23 +02:00
Simon Willnauer 85a0b76dbb Upgrade to Lucene 4.8.1
This commit upgrades to the latest Lucene 4.8.1 release including the
following bugfixes:

 * An IndexThrottle now kicks in when merges start falling behind
   limiting index threads to 1 until merges caught up. Closes #6066
 * RateLimiter now kicks in at the configured rate where previously
   the limiter was limiting at ~8MB/sec almost all the time. Closes #6018
2014-05-19 20:47:55 +02:00
Andrew Selden 3731362ca8 Do not throw execption on no available nodes when listing benchmarks.
Changed behavior to not throw an exception on a status request
when there are no available benchmark nodes.

Closes #6146
2014-05-19 11:42:15 -07:00
Tiago Alves Macambira 4dd2ba6d50 Register uppercase as an exposed ES token filter.
Just follow "lowercase" token filter example and register "uppercase" token filter as an exposed token filter. This will not, by itself, test whether ES is correctly handling "uppercase" TF; this is more of a "code as documentation" fix.
2014-05-19 13:49:33 -03:00
Simon Willnauer fc28fbfada Add dummy docs injection to indexRandom
This commit add `dummy docs` to `ElasticsearchIntegrationTest#indexRandom`.
It indexes document with an empty body into the indices specified by the docs
and deletes them after all docs have been indexed. This produces gaps in
the segments and enforces usage of accept docs on lower levels to ensure
the features work with delete documents as well.
2014-05-19 17:23:14 +02:00
Simon Willnauer 579a79d1ac Check accepts docs before MatchDocIdSet#matchDoc(int)
We currently ask `MatchDocIdSet#matchDoc(int)` before consulting
the accept docs. This can also have a negative performance impact
since `matchDoc(int)` calls might be way more expensive than
acceptDocs calls.

Closes #6234
2014-05-19 17:17:55 +02:00
Itamar Syn-Hershko d1589b3815 Fixing invalid jsons 2014-05-19 15:07:56 +02:00
Simon Willnauer 3e4c896944 [TEST] Drop obsolet test - the option is obsolet and won't be fixed 2014-05-19 15:06:04 +02:00
Simon Willnauer 72da764261 Don't report terms as live if all it's docs are filtered out
FilterableTermsEnum allows to filter stats by supplying per segment
bits. Today if all docs are filtered out the term is still reported as
live but shouldn't.

Relates to #6211
2014-05-19 13:48:56 +02:00
Simon Willnauer c593234b7c [TEST] Ensure multi_match & match query equivalence in the single field case 2014-05-19 13:32:24 +02:00
Martijn van Groningen 39018c5d0b [TEST] Added await for yellow status,
because the shard the get request for 'test' index, 'type1' type and id 1 is getting executed on may not be in a started state
and also added more logging.
2014-05-19 11:56:26 +02:00
Andrew Selden 420f2db4cd [DOCS] Cat recovery API update
This is an update for the _cat/recovery API documentation. The examples
have been updated. Removed the bottom paragraph explaining why there
could be values > 100%. This can no longer happen so that had to be
removed.

Closes #6159
2014-05-18 17:43:13 -07:00
Simon Willnauer d9441747e8 [TEST] Beef up MoreLikeThisActionTests#testCompareMoreLikeThisDSLWithAPI 2014-05-18 23:02:08 +02:00
Simon Willnauer 91b74931a3 [TEST] Stabelize MoreLikeThisActionTests
The `testCompareMoreLikeThisDSLWithAPI` test compares results from query
and API which might query different shards. Those shares might use
different doc IDs internally to disambiguate. This commit resorts the
results and compares them after stable disambiguation.
2014-05-18 22:57:46 +02:00
mikemccand 4f7792e64b Tie-break suggestions from phrase suggester by term
If the score for two suggestions is the same, we now tie break by term; earlier terms (aaa) sort before later terms (zzz).

Closes #5978
2014-05-18 16:45:37 -04:00
Simon Willnauer f79b28375d Add missing coming tag
Relates to #6188
Relates to #5539
2014-05-18 10:54:17 +02:00
Simon Willnauer dab4596b13 Use default forceAnalyzeQueryString if no query builder is present
In the single field case no query builder is selected which causes NPE
when the query has only a numeric field.

Closes #6215
2014-05-18 10:20:31 +02:00
Boaz Leskes 1e5138889e Translog: remove unneeded Versions.readVersion & Versions.writeVersion
These calls were introduced in pr #6149 as a backward compatibility layer for the previous value of `Versions.MATCH_ANY`. This is not needed as the translog never contains these values. On top of that, the calls are not effective as the stream the translog used is effectively not versioned (versioining is done on an item by item basis)
2014-05-18 09:45:00 +02:00
Boaz Leskes 682acfcacd DeleteRequest.version was not initialized to `Versions.MATCH_ANY` 2014-05-18 09:45:00 +02:00
Simon Willnauer c7db8843b3 [TEST] Stabelize BenchmarkIntegrationTest#testAbortBenchmark 2014-05-17 23:33:49 +02:00
Alex Ksikes db991dc3a4 More Like This Query: Added searching for multiple items.
The syntax to specify one or more items is the same as for the Multi GET API.
If only one document is specified, the results returned are the same as when
using the More Like This API.

Relates #4075 Closes #5857
2014-05-17 19:14:56 +02:00
Igor Motov a3581959d7 [TESTS] Ignore SnapshotMissingException in snapshotWithStuckNodeTest
The retry mechanism in the transport layer might cause the delete snapshot request to be executed twice if the cluster master is closed while the request is executed. First time delete snapshot request is getting successfully executed on the old master and then it is retried on the newly elected master. When the new master tries to delete the snapshot - the snapshot no longer exists (since it was successfully deleted by the old master) and SnapshotMissingException is returned.
2014-05-17 11:18:11 -04:00
Igor Motov c20713530d Switch to shared thread pool for all snapshot repositories
Closes #6181
2014-05-16 19:03:15 -04:00
Igor Motov 7f5befd95e Add Partial snapshot state
Currently even if some shards of the snapshot are not snapshotted successfully, the snapshot is still marked as "SUCCESS". Users may miss the fact the there are shard failures present in the snapshot and think that snapshot was completed. This change adds a new snapshot state "PARTIAL" that provides a quick indication that the snapshot was only partially successful.

Closes #5792
2014-05-16 18:26:56 -04:00
Boaz Leskes 9f10547f4b Allow 0 as a valid external version
Until now all version types have officially required the version to be a positive long number. Despite of this has being documented, ES versions <=1.0 did not enforce it when using the `external` version type. As a result people have succesfully indexed documents with 0 as a version. In 1.1. we introduced validation checks on incoming version values and causing indexing request to fail if the version was set to 0. While this is strictly speaking OK, we effectively have a situation where data already indexed does not match the version invariant.

To be lenient and adhere to spirit of our data backward compatibility policy, we have decided to allow 0 as a valid external version type. This is somewhat complicated as 0 is also the internal value of `MATCH_ANY`, which indicates requests should succeed regardles off the current doc version. To keep things simple, this commit changes the internal value of `MATCH_ANY` to `-3` for all version types.

Since we're doing this in a minor release (and because versions are stored in the transaction log), the default `internal` version type still accepts 0 as a `MATCH_ANY` value. This is not a problem for other version types as `MATCH_ANY` doesn't make sense in that context.

Closes #5662
2014-05-16 22:10:16 +02:00