Commit Graph

12131 Commits

Author SHA1 Message Date
Simon Willnauer 60b66a7235 [TRANSLOG] Fold Translog.View into it's only implementation 2015-05-18 17:05:36 +02:00
Adrien Grand a75cfb42de Mappings: Make DocumentMapper.refreshSource() private.
This method should not be public, we should refresh the source automatically
when we change mappings.
2015-05-18 17:05:02 +02:00
Simon Willnauer 8aef499aaa review comments 2015-05-18 17:00:47 +02:00
Simon Willnauer 470e875445 Decrement reference even if IndexShard#postRecovery barfs
This can cause a reference leak if we call `IndexShard#postRecovery`
on an already closed shard.
2015-05-18 16:58:41 +02:00
Simon Willnauer bba1528fa4 [TEST] Enable MockFS on InternalEngineTests and TranslogTests 2015-05-18 16:58:19 +02:00
Simon Willnauer 7d1eb6e900 [ENGINE] Close Translog if initial commit fails 2015-05-18 16:52:49 +02:00
Adrien Grand a2a41c0115 Merge pull request #11207 from jpountz/fix/recovery_no_mapping_update
Recovery: No need to send mappings to the master node on phase 2.
2015-05-18 16:50:03 +02:00
Adrien Grand 33adbe6082 Recovery: No need to send mappings to the master node on phase 2.
Now that mapping updates are synchronous, it is not necessary to send mappings
to the master node during the recovery process anymore: they will already be on
the master node since we ensure mappings are on the master node before indexing.
2015-05-18 16:38:13 +02:00
Adrien Grand 2c241e8a36 Mappings: Remove the `ignore_conflicts` option.
Mappings conflicts should not be ignored. If I read the history correctly, this
option was added when a mapping update to an existing field was considered a
conflict, even if the new mapping was exactly the same. Now that mapping updates
are smart enough to detect conflicting options, we don't need an option to
ignore conflicts.
2015-05-18 15:28:23 +02:00
Alexander Reelsen 8bdfd21b70 Internal: Propagate headers & contexts to sub-requests
Whenever a query parser (or any other component) issues another
request as part of a request, the headers and the context has to
be supplied as well.

In order to do this, the `SearchContext` has to have those headers
available, which in turn means, the shard level request needs to
copy those from the original `SearchRequest`

This commit introduces two new interface to supply the needed methods
to work with context and headers.

Closes #10979
2015-05-18 14:50:16 +02:00
Simon Willnauer 98640310c2 Remove dead code / unused class 2015-05-18 14:32:36 +02:00
Britta Weber 64956d2d87 add check at end of each test to see if documents are the same 2015-05-18 12:19:20 +02:00
Britta Weber f039c5de7a add rest statuses but need to discuss if they are the right ones 2015-05-18 11:06:36 +02:00
Simon Willnauer 7892c7c869 remove flushing before running checkindex 2015-05-18 11:03:11 +02:00
Adrien Grand 61a31dd57f Tests: Add information about shards that are not closed when the filter cache gets closed. 2015-05-18 10:42:45 +02:00
Britta Weber c4f9a41581 more comments and formatting 2015-05-18 10:41:13 +02:00
Simon Willnauer 6c56cedf9a Prevent MockStore where commits should be prevented on close 2015-05-18 10:12:15 +02:00
Simon Willnauer 03e5149994 [ENGINE] Remove the ability to flush without flushing the translog
This is a leftover from the times where we failed a flush when
recoveries are ongoing. This code is really not needed anymore and
we can luckily flush the translog all the time as well.
2015-05-18 09:56:25 +02:00
Simon Willnauer 8b8ba9a44f Implement toXContent on ShardOpertionFailureException
ShardOperationFailureException implementations alread provide structured
exception support but it's not yet exposed on the interface. This change
allows nice rendering of structured REST exceptions also if searches fail on
only a subset of the shards etc.

Closes #11017
2015-05-18 09:54:04 +02:00
Simon Willnauer f7696ec149 Merge pull request #11143 from elastic/feature/translog_checkpoints
Add translog checkpoints to prevent translog corruption

Closes to #10933
Relates to #11011
2015-05-18 09:42:51 +02:00
Adrien Grand b16e47c5fb Tests: Mark IndexCacheableQueryTests.testCache as @AwaitsFix. 2015-05-18 08:38:10 +02:00
Britta Weber 6ed472f873 comments for SyncedFlushService 2015-05-17 22:12:31 +02:00
Britta Weber 9ca17f834b inherit from BroadcastOperationRequest 2015-05-17 21:42:27 +02:00
Britta Weber 771763ae58 add error for inactive primary 2015-05-17 21:34:35 +02:00
Britta Weber a0315b5cb8 remove FAILED suffix 2015-05-17 21:29:31 +02:00
Britta Weber fcea10113c remove impl details from method name 2015-05-17 21:29:31 +02:00
Britta Weber 5ac07481eb assign variables 2015-05-17 21:29:31 +02:00
Britta Weber 018ad0bd76 final 2015-05-17 21:29:30 +02:00
Britta Weber 81e3d5cdcb use imutable object for commit id 2015-05-17 21:29:24 +02:00
Simon Willnauer 54ae0a557d [TEST] use correct index name created for this test 2015-05-17 20:26:13 +02:00
Simon Willnauer f9f0e99eae Merge branch 'master' into feature/translog_checkpoints
Conflicts:
	src/main/java/org/elasticsearch/index/engine/InternalEngine.java
2015-05-17 20:11:19 +02:00
Igor Motov 1038933832 Snapshot/Restore: Fix cluster state task name for update snapshot task
This commit fixes the name of the upated_snapshot task from something like "update_snapshot [org.elasticsearch.cluster.metadata.SnapshotMetaData$Entry@de00bc50]" to a more readable "update_snapshot [test-snap]"
2015-05-15 19:54:35 -04:00
Lee Hinman 22ae561bfd [GATEWAY] When using `recover_on_any_node`, respect Deciders
When in a shared filesystem environment and recovering the primary to
any node. We should respect the allocation deciders if possible (still
force-allocting to another node if there aren't any "YES" decisions).

The AllocationDeciders should take precedence over the shard state
version when force-allocating an unassigned primary shard.
2015-05-15 16:08:03 -06:00
Robert Muir f241236af0 Merge pull request #11194 from rmuir/mockito
allow mockito to be used in tests
2015-05-15 16:52:44 -04:00
Robert Muir b2a0ed3878 allow mockito to be used in tests 2015-05-15 16:33:24 -04:00
Robert Muir ae1d7e4ceb Merge branch 'master' of github.com:rmuir/elasticsearch 2015-05-15 16:33:08 -04:00
Robert Muir fc73540aac include rest tests in test-framework.jar
Closes #11192 which I accidentally already closed.

Squashed commit of the following:

commit f23faccddc2a77a880841da4c89c494edaa2aa46
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 16:04:55 2015 -0400

    Simplify this FileUtils even more: its either from the filesystem, or the classpath,
    not both. Its already trying 4 different combinations of crazy paths for either of these anyway.

commit c7016c8a2b5a6043e2ded4b48b160821ba196974
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 14:21:37 2015 -0400

    include rest tests in test-framework jar
2015-05-15 16:16:24 -04:00
Robert Muir 97ffb2b4fd include rest tests in test-framework.jar
Closes #11192 which I accidentally already closed.

Squashed commit of the following:

commit f23faccddc2a77a880841da4c89c494edaa2aa46
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 16:04:55 2015 -0400

    Simplify this FileUtils even more: its either from the filesystem, or the classpath,
    not both. Its already trying 4 different combinations of crazy paths for either of these anyway.

commit c7016c8a2b5a6043e2ded4b48b160821ba196974
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 14:21:37 2015 -0400

    include rest tests in test-framework jar
2015-05-15 16:15:23 -04:00
Simon Willnauer 217fd4443a Make SearchFactory static class in InternalEngine
Now that lucene provides a way to identify if the warming reader is
the first initial opened reader we can detach this class from the
enclosing and make it static. This is important since it might access
not fully initialized members of the enclosing class since it's initialized
and used during constructor invocation.
2015-05-15 22:02:00 +02:00
javanna a843008b17 Highlighting: require_field_match set to true by default
The default `false` for `require_field_match` is a bit odd and confusing for users, given that field names get ignored by default and every field gets highlighted if it contains terms extracted out of the query, regardless of which fields were queries. Changed the default to `true`, it can always be changed per request.

Closes #10627
Closes #11067
2015-05-15 21:38:45 +02:00
Clinton Gormley 9d71816cd2 Docs: Fixed explanation of AUTO fuzziness
Closes #11186
2015-05-15 21:25:11 +02:00
Scott Chamberlain ae599f93a7 Added an R client to community clients page
I maintain an R client called `elastic` at https://github.com/ropensci/elastic
2015-05-15 21:25:11 +02:00
javanna 46c521f7ec Highlighting: nuke XPostingsHighlighter
Our own fork of the lucene PostingsHighlighter is not easy to maintain and doesn't give us any added value at this point. In particular, it was introduced to support the require_field_match option and discrete per value highlighting, used in case one wants to highlight the whole content of a field, but get back one snippet per value. These two features won't
 make it into lucene as they slow things down and shouldn't have been supported from day one on our end probably.

One other customization we had was support for a wider range of queries via custom rewrite etc. (yet another way to slow
 things down), which got added to lucene and works much much better than what we used to do (instead of or rewrite, term
s are pulled out of the automata for multi term queries).

Removing our fork means the following in terms of features:
- dropped support for require_field_match: the postings highlighter will only highlight fields that were queried
- some custom es queries won't be supported anymore, meaning they won't be highlighted. The only one I found up until now is the phrase_prefix. Postings highlighter rewrites against an empty reader to avoid slow operations (like the ones that we were performing with the fork that we are removing here), thus the prefix will not be expanded to any term. What the postings highlighter does instead is pulling the automata out of multi term queries, but this is not supported at the moment with our MultiPhrasePrefixQuery.

Closes #10625
Closes #11077
2015-05-15 20:41:33 +02:00
markharwood caf723570d Aggregations improvement: exclude clauses with a medium/large number of clauses fail.
The underlying automaton-backed implementation throws an error if there are too many states.

This fix changes to using an implementation based on Set lookups for lists of excluded terms.
If the global-ordinals execution mode is in effect this implementation also addresses the slowness identified in issue 11181 which is caused by traversing the TermsEnum - instead the excluded terms’ global ordinals are looked up individually and unset the bits of acceptable terms. This is significantly faster.

Closes #11176
2015-05-15 19:17:53 +01:00
Adrien Grand 1a967ce267 Merge pull request #11180 from jpountz/enhancement/faster_scan
Search: Make SCAN faster.
2015-05-15 19:26:11 +02:00
Clinton Gormley 3a69b65e88 Docs: Fixed the backslash escaping on the pattern analyzer docs
Closes #11099
2015-05-15 18:40:16 +02:00
Adrien Grand 22bba91a16 Search: Make SCAN faster.
When scrolling, SCAN previously collected documents until it reached where it
had stopped on the previous iteration. This makes pagination slower and slower
as you request deep pages. With this change, SCAN now directly jumps to the
doc ID where is had previously stopped.
2015-05-15 18:23:10 +02:00
Jun Ohtani 597c53a0bb Add migrationi note for AnalyzeRequest 2015-05-16 00:25:53 +09:00
Simon Willnauer 5d4db0edde Remove accidential modification 2015-05-15 17:03:45 +02:00
Simon Willnauer 9f81ae4845 Merge branch 'master' into feature/translog_checkpoints
Conflicts:
	src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java
2015-05-15 17:01:23 +02:00