Commit Graph

25301 Commits

Author SHA1 Message Date
Jim Ferenczi 90247446aa Fix highlighting on a stored keyword field (#21645)
* Fix highlighting on a stored keyword field

The highlighter converts stored keyword fields using toString().
Since the keyword fields are stored as utf8 bytes the conversion is broken.
This change uses BytesRef.utf8toString() to convert the field value in a valid string.

Fixes #21636

* Replace BytesRef#utf8ToString with MappedFieldType#valueForDisplay
2016-11-21 10:29:30 +01:00
David Roberts 6daeb56969 Set execute permissions for native plugin programs (#21657) 2016-11-21 09:20:09 +00:00
javanna 9594b6f50f adjust visibility of DiscoveryNodes.Delta constructor
It can be private as it gets called by DiscoveryNodes#delta method, which is supposed to be the only way to create a Delta
2016-11-21 10:17:05 +01:00
javanna e0661c5262 Remove unused DiscoveryNodes.Delta constructor 2016-11-21 10:17:05 +01:00
javanna 596eebcf98 Remove unused DiscoveryNode#removeDeadMembers public method 2016-11-21 10:17:05 +01:00
javanna b19c606cef Remove minNodeVersion and corresponding public `getSmallestVersion` getter method from DiscoveryNodes 2016-11-21 10:17:05 +01:00
Ludovic Dubost 366241508e Adding XWiki Elasticsearch Macro (#21505)
Added link to Elasticsearch Macro with description
2016-11-19 16:51:05 +01:00
Jeffery Bradberry 9322c4fe62 The alias is switched to point to the new index (#21512)
If the index satisfies the specified conditions then a new index is created and the alias is switched to point to the new index.
2016-11-19 16:47:39 +01:00
Jason Tedor 655c4fe172 Wrap GroovyBugErrors in ScriptExceptions
When Groovy detects a bug in its runtime because an internal assertion
was violated, it throws an GroovyBugError. This descends from
AssertionError and if it goes uncaught will land in the uncaught
exception handler and will not deliver any useful information to the
user. This commit wraps GroovyBugErrors in ScriptExceptions so that
useful information is returned to the user.
2016-11-19 07:11:13 -05:00
Shubham Aggarwal dce51e2062 Update getting-started.asciidoc (#21677) 2016-11-19 12:45:28 +01:00
Jason Tedor aed88fe7a2 Log node ID on startup
If the node name is explicitly set it's not derived from the node ID
meaning that it doesn't immediately appear in the logs. While it can be
tracked down in other places, it would be easier for info purposes if it
just showed up explicitly. This commit adds the node ID to the logs,
whether or not the node name is set.

Relates #21673
2016-11-19 06:27:25 -05:00
Nik Everett ae468441dc Implement the ?: operator in painless (#21506)
Implements a null coalescing operator in painless that looks like `?:`. This form was chosen to emulate Groovy's `?:` operator. It is different in that it only coalesces null values, instead of Groovy's `?:` operator which coalesces all falsy values. I believe that makes it the same as Kotlin's `?:` operator. In other languages this operator looks like `??` (C#) and `COALESCE` (SQL) and `:-` (bash).

This operator is lazy, meaning the right hand side is only evaluated at all if the left hand side is null.
2016-11-18 13:54:26 -05:00
Jason Tedor 484ad31ed9 Clarify that plugins can be closed
Plugins are closed if they implement java.io.Closeable but this is not
clear from the plugin interface. This commit clarifies this by declaring
that Plugins implement java.io.Closeable and adding an empty
implementation to the base Plugin class.

Relates #21669
2016-11-18 13:04:28 -05:00
Sakthipriyan Vairamani 52d4cd504a minor grammatical improvements (#21640) 2016-11-18 08:55:04 -07:00
ismael-hasan 7906db83d5 Update BulkProcessor size in the example
By default, it is recommended to start bulk with a size of 10-15MB, and increase it gradually to get the right size for the environment. The example shows originally 1GB, which can lead to some users to just copy-paste the code snippet and start with excessively big sizes.

Backport of #21664 in master branch.
2016-11-18 16:52:46 +01:00
Simon Willnauer 99f8c21d9a Don't reset non-dynamic settings unless explicitly requested (#21646)
AbstractScopedSettings has the ability to only apply updates/deletes
to dynamic settings. The flag is currently not respected when a setting
is reset/deleted which causes static node settings to be reset if a non-dynamic
key is reset via `null` value.

Closes #21593
2016-11-18 16:40:18 +01:00
Ali Beyad 1d2a1540cc Makes allocator decision classes top-level classes (#21662)
This commit moves several allocation decider related inner classes
into their own top-level class, in order to use more easily in
the allocation explain API. This commit also renames some of those
decision related classes to more suitable names.

This is simply a cosmetic change - no functionality changes with this
commit whatsoever.

To summarize the changes:
 1. ShardAllocationDecision renamed to AllocateUnassignedDecision
 2. RelocationDecision moved to a top-level class
 3. MoveDecision moved to a top-level class
 4. RebalanceDecision moved to a top-level class
 5. ShardAllocationDecisionTests renamed to AllocateUnassignedDecisionTests
 6. NodeRebalanceResult moved to a top-level class
 7. ShardAllocationDecision#WeightedDecision moved to a top-level class and renamed to NodeAllocationResult.
2016-11-18 10:19:27 -05:00
Luca Wintergerst 7a533577b8 Merge pull request #21651 from elastic/suggester-docs-example-fix
fix two errors in suggester docs
2016-11-18 13:13:13 +01:00
Jason Tedor 5ca60fa78b Remove stale mention of minimum master nodes check
This commit removes a stale mention of the minimum master nodes boostrap
check from the docs.

Relates #21653
2016-11-18 06:56:23 -05:00
David Pilato 407624c95a Merge remote-tracking branch 'origin/master' 2016-11-18 12:49:03 +01:00
Yannick Welsch b1fd257c42 [TEST] Fix testTimedOutUpdateTaskCleanedUp to wait for blocking task to be completed
The "test" task can complete its execution with a timeout exception before the "block-task" actually starts executing. The test thus has to wait for both to be
completed before checking that the updateTasksPerExecutor map has been properly cleaned up.
2016-11-18 12:34:50 +01:00
David Pilato bccbc75efe Merge branch 'pr/update-tika-1.14' 2016-11-18 12:33:45 +01:00
Luca Wintergerst 277f4b8d24 fix two errors in suggester docs
The first changed referred to an example of the 2.4 documentation. I removed the no longer relevant parts. We should consider adding a little more here. 

The second change was just then->than in the suggest_mode popular section
2016-11-18 12:05:49 +01:00
Tanguy Leroux b9bee8bca3 Remove transport-netty3-client mention (#21650)
Now netty3 is gone, this mention must also be removed.
2016-11-18 11:54:22 +01:00
David Roberts 2321782703 Fix Windows test failure (#21647) 2016-11-18 09:51:42 +00:00
Jack Conradson ced433e9a8 Fix reserved variable availability in lambdas in Painless 2016-11-17 13:39:08 -08:00
Christoph Büscher 4a7b70cc08 Don't require `types` parameter in IdsQueryBuilder constructor
According to the docs and our own tests we accept an ids query without specified
types and default to all types in the index mapping in this case. This changes
the builder to reflect this by making the types no longer a required constructor
argument and changes the parser to reflect that.
2016-11-17 20:22:48 +01:00
Christoph Büscher b8cae39b7c Using ObjectParser in MatchAllQueryBuilder and IdsQueryBuilder
A first step moving away from the current parsing to use the generalized
Objectparser and ConstructingObjectParser. This PR start by making use of it in
MatchAllQueryBuilder and IdsQueryBuilder.
2016-11-17 20:22:48 +01:00
Nik Everett 2a1e08f76a Fix compilation in Eclipse (#21606)
* Fix compilation in Eclipse

I'm not sure what the bug is, but ecj doesn't like this expression
unless the type is set explicitly.

* Add comment explaining why no diamond operator
2016-11-17 12:54:57 -05:00
Jim Ferenczi 09fbb4d06d Fix match_phrase_prefix on boosted fields (#21623)
This change fixes the match_phrase_prefix on fields that define a boost in their mapping.

Fixes #21613
2016-11-17 18:45:34 +01:00
Ryan Ernst 914664d89a Fix leftover reference to ScriptModule in native script docs 2016-11-17 08:22:15 -08:00
Nik Everett df2a5e7691 Mark snippet in docker docs NOTCONSOLE
That keeps us from failing the build because it is "unconverted".

Relates to #21497
2016-11-17 10:07:42 -05:00
Dimitrios Athanasiou dbbba8ffbe Add comment to explain flexible assertion in indices rollover IT 2016-11-17 14:49:10 +00:00
Dimitris Athanasiou a75320f89b Replace IndexAlreadyExistsException with ResourceAlreadyExistsException (#21494) 2016-11-17 14:30:21 +00:00
Jason Tedor b08a2e1f31 Expose executor service interface from thread pool
This commit exposes the executor service interface from thread
pool. This will enable some high-level concurrency primitives that will
make some code cleaner and simpler.

Relates #21608
2016-11-17 09:18:49 -05:00
Dimitrios Liappis 6c9ea0877d [docs] Document Docker installation method
Initial commit of the Docker installation method for Elasticsearch.

Relates #21497
2016-11-17 15:06:32 +02:00
Simon Willnauer de04aad994 Remove `modules/transport_netty_3` in favor of `netty_4` (#21590)
We kept `netty_3` as a fallback in the 5.x series but now that master
is 6.0 we don't need this or in other words all issues coming up with
netty 4 will be blockers for 6.0.
2016-11-17 12:44:42 +01:00
David Roberts 116593e5f5 Adjust bootstrap sequence (#21543)
Added the ability for plugins to spawn a controller process at startup
2016-11-17 09:58:09 +00:00
David Pilato 36ac9fdfe1 Merge branch 'doc/lenient-multi-match' 2016-11-17 10:21:23 +01:00
Adrien Grand 6581b77198 Remove store throttling. (#21573)
Store throttling has been disabled by default since Lucene added automatic
throttling of merge operations based on the indexing rate.
2016-11-17 09:33:32 +01:00
David Pilato 475a7ca84f Add documentation for lenient in multimatch
`lenient` option is documented for `match` query but not for `multi_match` query.
2016-11-17 08:35:20 +01:00
Jason Tedor d3b444ad8a Truncate log messages from the end
Our default pattern layout truncates log messages. This is to avoid
blowing disk space from excessively log messages, which can happen if a
message contains a mapping or an large query. Yet, we trunacte from the
beginning which is probably where the most germane information is. This
commit modifies the default pattern layout to trunacte from the end.

Relates #21609
2016-11-16 21:45:14 -05:00
Ryan Ernst 1732fd2ea6 Remove rogue file from the by-gone days of 2.x. 2016-11-16 16:22:01 -08:00
Nik Everett 4bc8feea1d Fix shrink tests on disks w/<15% free
The tests rely on the allocation decider allowing allocation and
the disk threshold decider wasn't allowing it. This came up from
time to in CI but *all* the time on my local machine because it is
a small ssd.
2016-11-16 14:46:52 -05:00
Jason Tedor 9792b5792a Respect default search timeout
The default search timeout is not respected because the timeout is
unconditionally set from the query. This commit fixes this issue, and
adds a test that the default search timeout is correctly attached to the
search context.

Relates #21599
2016-11-16 12:43:47 -05:00
David Pilato c946094d5b Add documentation for lenient in multimatch
`lenient` option is documented for `match` query but not for `multi_match` query.
2016-11-16 16:15:28 +01:00
Jason Tedor d06a8903fd Merge branch 'master' into feature/seq_no
* master: (22 commits)
  Add proper toString() method to UpdateTask (#21582)
  Fix `InternalEngine#isThrottled` to not always return `false`. (#21592)
  add `ignore_missing` option to SplitProcessor (#20982)
  fix trace_match behavior for when there is only one grok pattern (#21413)
  Remove dead code from GetResponse.java
  Fixes date range query using epoch with timezone (#21542)
  Do not cache term queries. (#21566)
  Updated dynamic mapper section
  Docs: Clarify date_histogram bucket sizes for DST time zones
  Handle release of 5.0.1
  Fix skip reason for stats API parameters test
  Reduce skip version for stats API parameter tests
  Strict level parsing for indices stats
  Remove cluster update task when task times out (#21578)
  [DOCS] Mention "all-fields" mode doesn't search across nested documents
  InternalTestCluster: when restarting a node we should validate the cluster is formed via the node we just restarted
  Fixed bad asciidoc in boolean mapping docs
  Fixed bad asciidoc ID in node stats
  Be strict when parsing values searching for booleans (#21555)
  Fix time zone rounding edge case for DST overlaps
  ...
2016-11-16 09:10:35 -05:00
Jason Tedor b2b7595fa7 Temporarily set BWC version to 6.0.0 for seq. no
There is not yet a BWC layer in sequence numbers. This commit sets the
BWC version to 6.0.0 for the BWC and rolling upgrade tests until this
BWC layer is built.
2016-11-16 09:09:38 -05:00
Jason Tedor db5f51b839 Revert "disable backwards-5.0 tests as there is no BWC layer in the seq# related components"
This reverts commit db87837c72.
2016-11-16 09:09:35 -05:00
Yannick Welsch aa73a76ffd Add proper toString() method to UpdateTask (#21582)
Adds a proper toString() method to ClusterService.UpdateTask
2016-11-16 15:07:26 +01:00