Commit Graph

6016 Commits

Author SHA1 Message Date
Ryan Ernst fe5e99a408 Plugins: Update official plugin locaion with unified release
This change updates the url pattern for official plugins to be inline
with what the unified release will produce.
2016-08-15 13:24:11 -07:00
Ali Beyad 5ba06b6487 Removes support for adding aliases to analyzers. Indices created pre 5.x (#19994)
that have analyzer aliases in their analysis settings will still work, but
any attempts to create an alias for analyzers in newly created indices
will result in an IllegalArgumentException.

As a result, the setting `index.analysis.analyzer.{analyzerName}.alias` is
no longer supported.

Closes #18244
2016-08-15 16:17:58 -04:00
Igor Motov 10a766704e Rename Task Persistence into Storing Task Results
The term persisted task was used to indicate that a task should store its results upon its completion. We would like to use this term to indicate that a task can survive restart of nodes instead. This commit removes usages of the term "persist" when it means store results.
2016-08-15 10:02:43 -04:00
Jason Tedor d94e388904 Fix number of nodes in discovery disruption tests
This commit fixes the number of max local storage nodes setting used in
the discovery disruption tests. In some cases (randomly but rarely), the
acked indexing test can run with five nodes instead of three, breaching
the max local storage nodes configuration.
2016-08-14 21:03:05 -04:00
Nik Everett 153b2ae180 Checkstyle 2016-08-12 18:21:15 -04:00
Nik Everett cf6e1a4362 Move all FetchSubPhases to `o.e.search.fetch.subphase`
As the most complicated `FetchSubPhase` highlighting gets its own package
(`o.e.seach.fetch.subphase.highlight`. No other `FetchSubPhase`s get their
own package. Instead they all reside together in `o.e.search.fetch.subphase`.

Add package descriptions to `o.e.search.fetch` and subpackages.
2016-08-12 18:21:15 -04:00
Areek Zillur 40d7ebc515 Fix bug in single shard optimization when sorting documents in search request
This commit adds a function to shard-level query result to determine whether
there are any hits that needs fetching. Currently, a shard-level query result
can have hits when there are search hits and/or completion suggestion hits.
The newly added function encapsulates the checks to determine if a shard-level
query result has any fetchable hits, which is used in optimizing for sorting
documents and releasing search request contexts.
2016-08-12 17:32:22 -04:00
javanna efc32746eb fix typo getMovingAverageMdelParserRegistry->getMovingAverageModelParserRegistry in SearchModule 2016-08-12 20:33:06 +02:00
javanna 20e4fed65c fix javadocs for SearchExtensionSpec 2016-08-12 20:30:08 +02:00
Xiang Chen 77f28dbdde fix CompletionSuggestion test failed caused by shard is 1 2016-08-13 00:20:46 +08:00
Yannick Welsch 35e4f24467 Remove dead code that promotes replica relocation target to primary (#19973)
If a primary fails, an active replica is promoted to primary. Once we do the promotion, however, we are sure that the active replica is not relocating anymore. The reason is that when the primary fails, we first remove/cancel all initializing replicas (also if they are relocation targets). This is the only safe thing to do anyhow, because promoting relocating replica to primary would also mean that the replica recovery of the replica relocation target is suddenly promoted to primary relocation, which the recovery code treats in a different way.
2016-08-12 16:42:10 +02:00
Jun Ohtani 8d4bc0b2a8 Merge pull request #19929 from johtani/fix/stop_using_cached_components_in_analyze_api
Stop using cached component in _analyze API
2016-08-12 23:00:54 +09:00
Jim Ferenczi bf312f4203 Add the shard ID and the node name in the output of the search slow log.
This change outputs '[nodeName] [indexName][shardId]' instead of [indexName/indexUUID]

closes #19735
2016-08-12 15:32:40 +02:00
Jason Tedor 1f0673c9bd Default max local storage nodes to one
This commit defaults the max local storage nodes to one. The motivation
for this change is that a default value greather than one is dangerous
as users sometimes end up unknowingly starting a second node and start
thinking that they have encountered data loss.

Relates #19964
2016-08-12 09:26:20 -04:00
Jun Ohtani 2cde3b07cd Stop using cached component in _analyze API
Add javadoc some methods

Closes #19827
2016-08-12 21:54:45 +09:00
Jim Ferenczi b73751a4b5 Fix explain output for dfs query
ContextIndexSearcher#explain ignores the dfs data to create the normalized weight.
This change fixes this discrepancy by using the dfs data to create the normalized weight when needed.
2016-08-12 12:14:38 +02:00
Nik Everett 9f8f2ea54b Remove ESIntegTestCase#pluginList
It was a useful method in 1.7 when javac's type inference wasn't as
good, but now we can just replace it with `Arrays.asList`.
2016-08-11 15:44:02 -04:00
javanna 2f360ecc16 fix typo and make parseIndexConstraints method static in FieldStatsRequest 2016-08-11 20:29:27 +02:00
Ali Beyad 50b31ce620 Remove //norelease from IndexWithShadowReplicasIT test that checks
asserts the indices directory is deleted on index deletion, as we
are no longer considering it a blocker for releasing.

Relates #17695
2016-08-11 13:07:39 -04:00
Yannick Welsch 522b137097 Make NetworkPartition disruption scheme configurable (#19534)
This commit separates the description of the links in the network that are to be disrupted from the failure that is to be applied to the links (disconnect/unresponsive/delay). Previously we had subclasses for the various kind of network disruption schemes combining on one hand failure mode (disconnect/unresponsive/delay) as well as the network links to cut (two partitions / bridge partitioning) into a single class.
2016-08-11 14:55:06 +02:00
Yannick Welsch 4b33d8bb94 Mute test CompletionSuggestionTests.testToReduce
Relates to #19896
2016-08-11 14:46:12 +02:00
Jim Ferenczi 6130677a96 Merge pull request #19945 from jimferenczi/ttl_version_lookup
Remove useless PK lookup in IndicesTTLService
2016-08-11 14:19:03 +02:00
Jim Ferenczi 729f443199 Remove useless PK lookup in IndicesTTLService
This is a follow up of https://github.com/elastic/elasticsearch/pull/19944#issuecomment-239119859
Since the docid is known we can directly access the version doc value.
2016-08-11 12:30:22 +02:00
Jim Ferenczi 1f75d05a2a VersionFetchSubPhase should not use Versions#loadDocIdAndVersion
Since we already know the docId, the PK lookup is useless and we can directly get the value from the numeric doc values.
2016-08-11 11:39:01 +02:00
Yannick Welsch a1538de1a1 [TEST] Leave default ping timeouts on tests that don't simulate network failures
Reducing the ping timeouts on a test that does not simulate network failures can cause node disconnects within the test on a slow CI machine.
The test testSearchWithRelocationAndSlowClusterStateProcessing does not expect such disconnects, leading to shard relocation in the test to abort prematurely.
2016-08-11 11:05:38 +02:00
Jason Tedor c3253130d4 Mark halting the virtual machine as privileged
Today in the uncaught exception handler, we attempt to halt the virtual
machine on fatal errors. Yet, halting the virtual machine requires
privileges which might not be granted to the caller when the exception
is thrown for example from a scripting engine. This means that if an
OutOfMemoryError or another fatal error is hit inside a script, the
virtual machine will not exit because the halt call will be denied for
securiry privileges. In this commit, we mark this halt call as trusted
so that the virtual machine can be halted if a fatal error is
encountered in a script.

Relates #19923
2016-08-10 21:22:53 -04:00
Ryan Ernst 82fc86553c remove dots in field names tests for mapping api 2016-08-10 17:11:02 -07:00
Ryan Ernst 58c15f01b5 Merge branch 'master' into dots_in_mapper_names 2016-08-10 15:41:23 -07:00
Luca Cavanna 8a0d71924c Merge pull request #19926 from javanna/enhancement/threadcontext_cleanup
Reduce ThreadContext's inner classes visibility
2016-08-10 20:38:33 +02:00
Jun Ohtani f63fcefbd0 Stop using cached component in _analyze API
Stop calling tokenizer/tokenFilters/chaFilter method of IndexService
Add some getAnalysisProvider methods
Change SynonymTokenFilterFactory constructor

Closes #19827
2016-08-11 02:41:34 +09:00
Christoph Büscher 563bf0154c Merge pull request #19920 from cbuescher/remove-SuggestUtil
Remove SuggestUtil helper class
2016-08-10 19:22:22 +02:00
javanna ea6b7b46c9 reduce ThreadContext's inner classes visibility 2016-08-10 18:06:35 +02:00
Christoph Büscher d11521318d Renaming method according to review comments 2016-08-10 18:03:39 +02:00
Adrien Grand 0d6ac57acf Collapse o.e.index.mapper packages. #19921
I also reduced the visibility of a couple classes and renamed/consolidated some
test classes for consistency, eg. removing the `Simple` prefix or using the
`<Type>FieldMapperTests` convention for testing field mappers.
2016-08-10 17:51:11 +02:00
Christoph Büscher 9c91ced029 Removing use of ParseFields where we have alternative in other classes already 2016-08-10 16:20:34 +02:00
Christoph Büscher e6d57af0c5 Moving join() helper function to WordScorer 2016-08-10 16:20:33 +02:00
Christoph Büscher cdc77648a1 Move analysis helper methods to DirectCandidateGenerator 2016-08-10 16:20:29 +02:00
Christoph Büscher d6e16b6e74 Move getDirectSpellChecker to DirectSpellcheckerSettings 2016-08-10 16:06:05 +02:00
javanna a13dbc12e2 SuggestUtils#analyze: assign success variable a value 2016-08-10 12:57:24 +02:00
javanna a0e32e9dfe move SuggestUtils methods to their respective callers
These methods are called only once, they are then moved to the classes that call them, and become private.
2016-08-10 12:54:38 +02:00
javanna ae78394c03 Remove redundant generics type declaration 2016-08-10 12:28:06 +02:00
javanna 297b2d6739 remove unused methods from SuggestUtils
Parsing code was moved to the builder objects, these methods were left behind unused
2016-08-10 12:28:06 +02:00
javanna 2c44278ce8 [TEST] use ParseField instead of plain strings in query tests 2016-08-10 12:21:25 +02:00
javanna 0a98b5e56e [TEST] make AbstractQueryTestCase#testUnknownObjectException more accurate
testUnknownObjectException used to generate malformed json objects in some cases, due to the existence of arrays as it was not closing the injected object correctly. That is why the test was catching JsonParseException among the exception that are expected to be thrown. That is fixed by tracking where the new object is placed and placing its end object marker to the right level rather than always at the end.

Also introduced a mechanism to explicitly declare objects that won't cause any exception when they get additional objects injected, so that there is no need to override the method anymore as that caused copy pasting of the whole test method. This also makes sure that changes are reflected in tests, as those inner objects are not skipped but we actually check that what is declared is true (no exceptions get thrown when an additional object is added within them.
2016-08-10 11:48:51 +02:00
javanna f221b0ce52 [TEST] inner_hits is now parsed on the coord node, no need to skip such objects in testUnknownObjectException 2016-08-10 11:48:51 +02:00
javanna 57b90cb6ce rename local loop variable ingore->ignore 2016-08-10 10:17:54 +02:00
Adrien Grand 42725e9339 Fix expectations of GeoPointFieldMapperTests.
Closes #19895
2016-08-10 09:30:39 +02:00
Ryan Ernst 38d4382565 Mappings: Support dots in field names in mapping parsing
This change adds support for treating dots in field names found in
mappings as path separators, like was previously done for dynamic
mappings and document parsing.

closes #19443
2016-08-09 14:35:35 -07:00
Ryan Ernst 6efbe54255 Remove alpha5 bwc indexes
We don't have bwc indexes for alpha releases.
2016-08-09 13:25:16 -07:00
Ali Beyad 601602b364 Check restores in progress before deleting a snapshot (#19853)
Currently, when attempting to delete a snapshot, we check
if a snapshot is in progress before proceeding with the
delete. However, we do not check if a restore is taking
place before deleting. This can lead to concurrency issues
where a restore is in progress but the snapshotted files
for the restore are being deleted underneath.

This commit first checks if a restore is in progress and
if so, it prevents the deletion of a snapshot with an
exception.

Note that this is not a complete solution because it is
still possible that a restore of the same snapshot is
started after the deletion commenced but before the
deletion finished. But there is a much smaller window
for this to occur and this commit is a quick way to
check for the common case.
2016-08-09 15:07:09 -05:00