Commit Graph

27939 Commits

Author SHA1 Message Date
Martijn van Groningen 428e70758a
Moved more token filters to analysis-common module.
The following token filters were moved: `edge_ngram`, `ngram`, `uppercase`, `lowercase`, `length`, `flatten_graph` and `unique`.

Relates to #23658
2017-06-15 18:28:31 +02:00
Jim Ferenczi 2a78b0a19f [Test] Make sure that SearchAfterSortedDocQueryTests uses a single threaded searcher 2017-06-15 18:13:38 +02:00
debadair c161d90524 [DOCS] Defined es-test-dir and plugins-examples-dir in index.asciidoc. (#25232)
Use these attributes when specifying the location of included tests.
2017-06-15 08:54:10 -07:00
markharwood 7a3155368c Test fix - removed superfluous assertion (#25247)
Closes #25245
2017-06-15 16:29:25 +01:00
Jim Ferenczi 5e64cd08bc [Test] restore BWC for parent-join now that the new mapping format is in 5.x 2017-06-15 15:15:48 +02:00
Jim Ferenczi 9ca33e2450 Add a section named "relations" in the ParentJoinFieldMapper (#25248)
* Add a section named "relation" in the ParentJoinFieldMapper

This commit puts the parent/child definition in an inner section named "relation".
Mapping for the parent-join will look like this:

```
"join_field": {
  "type": "join"
  "relations":
    "parent": "child"
  }
}
```
2017-06-15 14:56:20 +02:00
Martijn van Groningen fe02829aac test: Ported more OldIndexBackwardsCompatibilityIT tests to full cluster restart qa tests. (#25173)
Relates to #24939
2017-06-15 14:48:06 +02:00
Tal Levy 2cd771a230 fix: Sort Processor does not have proper behavior with targetField (#25237)
to specify a `targetField`. This results in some interesting behavior that was missed in the review.
This processor sorts in-place, so there is a side-effect in both the original field and the target field.
Another bug was that the targetField was not being set if the list being sorted was fewer than two elements.

The new behavior works like this: If targetField and fieldName are not the same, we copy the list.
2017-06-15 05:28:54 -07:00
Adrien Grand 1b90c46a53 Allow reader wrappers to have different live docs but the same cache key.
Relates to #19856
2017-06-15 13:51:46 +02:00
Jim Ferenczi 0036f28a6a Upgrade icu4j for the ICU analysis plugin to 59.1 (#25243)
* Upgrade icu4j for the ICU analysis plugin to 59.1

Lucene upgraded to 59.1 so we should use the same.

Closes #21425

* Add breaking change for the icu upgrade
2017-06-15 13:26:48 +02:00
Boaz Leskes 648b4717a4 move assertBusy to use CheckException (#25246)
We use assertBusy in many places where the underlying code throw exceptions. Currently we need to wrap those exceptions in a RuntimeException which is ugly.
2017-06-15 13:24:07 +02:00
Tanguy Leroux 27f1206999 Use SPI in High Level Rest Client to load XContent parsers (#25098)
This commit adds a NamedXContentProvider interface that can 
be implemented by plugins or modules using Java's SPI feature 
in order to provide additional NamedXContent parsers to external
applications like the Java High Level Rest Client.
2017-06-15 12:50:02 +02:00
Luca Cavanna 60687734a3 [TEST] test that low level REST client leaves path untouched (#25193)
Relates to #24987
2017-06-15 11:32:26 +02:00
Adrien Grand 5a6fa62844 Speed up PK lookups at index time. (#19856)
At index time Elasticsearch needs to look up the version associated with the
`_id` of the document that is being indexed, which is often the bottleneck for
indexing.

While reviewing the output of the `jfr` telemetry from a Rally benchmark, I saw
that significant time was spent in `ConcurrentHashMap#get` and `ThreadLocal#get`.
The reason is that we cache lookup objects per thread and segment, and for every
indexed document, we first need to look up the cache associated with this
segment (`ConcurrentHashMap#get`) and then get a state that is local to the
current thread (`ThreadLocal#get`). So if you are indexing N documents per
second and have S segments, both these methods will be called N*S times per
second.

This commit changes version lookup to use a cache per index reader rather than
per segment. While this makes cache entries live for less long, we now only need
to do one call to `ConcurrentHashMap#get` and `ThreadLocal#get` per indexed
document.
2017-06-15 10:17:42 +02:00
Alexander Kazakov 64abc47ab0 [Docs] Fix documentation for percentiles bucket aggregation (#25229) 2017-06-15 10:16:32 +02:00
Adrien Grand 0c117145f6 Upgrade to lucene-7.0.0-snapshot-92b1783. (#25222)
This snapshot has faster range queries on range fields (LUCENE-7828), more
accurate norms (LUCENE-7730) and the ability to use fake term frequencies
(LUCENE-7854).
2017-06-15 09:52:07 +02:00
Ryan Ernst 106e373412 Build: Add master flag for disabling bwc tests (#25230)
This commit adds a gradle project, set inside the root build.gradle,
which controls all our bwc tests. This allows for seamless (ie no errant
CI failures) backporting of behavior.
2017-06-14 22:01:49 -07:00
Ryan Ernst caf7792db1 Scripting: Rename SearchScript.needsScores to needs_score (#25235)
This commit renames the needsScores method so as to make it
automatically generatable, based on the name of the `_score` variable
which is available in search scripts. It also adds documentation to
ScriptContext to explain the naming and signature of such methods.
2017-06-14 22:01:19 -07:00
Jack Conradson a4471f51e4 Support script context stateful factory in Painless. (#25233) 2017-06-14 16:44:41 -07:00
Jim Ferenczi 68deda6d03 FastVectorHighlighter should not cache the field query globally (#25197)
This commit removes the global caching of the field query and replaces it with
a caching per field. Each field can use a different `highlight_query` and the rewriting of
some queries (prefix, automaton, ...) depends on the targeted field so the query used for highlighting
must be unique per field.
There might be a small performance penalty when highlighting multiple fields since the query needs to be rewritten
once per highlighted field with this change.

Fixes #25171
2017-06-15 00:33:01 +02:00
Lee Hinman 4a30e23365 Remove QUERY_AND_FETCH BWC for pre-5.3.0 nodes (#25223)
* Remove QUERY_AND_FETCH BWC for pre-5.3.0 nodes

This was a BWC layer where we expicitly set the `search_type` to
"query_and_fetch" when a single node is queried on pre-5.3 nodes. Since 6.0 no
longer needs to be compatible with 5.3 nodes, this can be removed.

* Fix indentation

* Remove unused QUERY_FETCH_ACTION_NAME constant
2017-06-14 15:42:29 -06:00
Zachary Tong 52719b2118 Add more missing AggregationBuilder getters (#25198)
* Add more missing AggregationBuilder getters

- getMetadata for all aggs
- various getters on TermsAggBuilder (without "get" prefix to maintain convention)
- Also makes InternalSum's ctor public, to follow suit of other metrics (min/max/avg/etc)
2017-06-14 14:31:01 -04:00
Nik Everett ce11b894b4 Extract the snapshot/restore full cluster restart tests from the translog full cluster restart tests (#25204)
Extract the snapshot/restore full cluster restart tests from the translog full cluster restart tests. That way they are easier to read.
2017-06-14 13:03:59 -04:00
Lee Hinman aa3134c093 Refactor TransportShardBulkAction.executeUpdateRequest and add tests
This splits `executeUpdateRequest` into separate parts and adds some unit tests
for the behavior in it. The actual behavior has not been changed.
2017-06-14 09:27:58 -06:00
Adrien Grand cadd31b3a8 Make sure range queries are correctly profiled. (#25108)
We introduced a new API for ranges in order to be able to decide whether points
or doc values would be more appropriate to execute a query, but since
`ProfileWeight` does not implement this API, the optimization is disabled when
profiling is enabled.
2017-06-14 16:31:16 +02:00
Jay Modi ed76b9a518 Test: allow setting socket timeout for rest client (#25221)
In #25201, a setting was added to allow setting the retry timeout for the rest client under the
impression that this would allow requests to go longer than 30s. However, there is also a socket
timeout that needs to be set to greater than 30s, which this change adds a setting for.
2017-06-14 08:21:56 -06:00
Boaz Leskes a0fcfc732d Migration docs for #25080 (#25218) 2017-06-14 14:06:53 +02:00
John Murphy c652b586c4 Remove `discovery.type` BWC layer from the EC2/Azure/GCE plugins #25080
Those plugins don't replace the discovery logic but rather only provide a custom unicast host provider for their respective platforms. in 5.1 we introduced the  `discovery.zen.hosts_provider` setting to better reflect it. This PR removes BWC code in those plugins as it is not needed anymore

Fixes #24543
2017-06-14 13:52:48 +02:00
David Roberts a5658c0fea When stopping via systemd only kill the JVM, not its control group (#25195)
This prevents possible race conditions between the Elasticsearch JVM and
plugin native controller processes that can cause the Elasticsearch shutdown
to hang.  The problem can happen when the JVM and the controller process
receive a SIGTERM at almost the same time.

(There's an assumption here that Elasticsearch will continue to use other
mechanisms to kill native controller processes.)
2017-06-14 09:23:41 +01:00
Martijn van Groningen e333955557
Remove PrefixAnalyzer, because it is no longer used. 2017-06-14 08:59:10 +02:00
Ryan Ernst 9ec1fc7b02 Internal: Remove Strings.cleanPath (#25209)
This commit removes the cleanPath method, in favor of using java's
Path.normalize().
2017-06-13 21:09:45 -07:00
Ryan Ernst 1bd5cecc34 Docs: Add note about which secure settings are valid (#25212)
This commit adds a note to the docs to clarify that only some settings
can be used with the keystore.
2017-06-13 21:04:16 -07:00
Boaz Leskes 43f4ae5a7b Indices.rollover/10_basic should refresh to make the doc visible in lucene stats 2017-06-13 23:37:15 +02:00
Adis Nezirović 82897e2636 Port support for commercial GeoIP2 databases from Logstash. (#24889)
* Port support for commercial GeoIP2 databases from Logstash.

* Match GeoIP databases according to the database name suffix.

* Rename CITY/COUNTRY_DB_TYPE, since they are suffixes now.
2017-06-13 14:20:01 -07:00
Lisa Cawley d181761aeb [DOCS] Add ML node to node.asciidoc (#24495)
* [DOCS] Add ML node to node.asciidoc

* [DOCS] Clarify ML node in node.asciidoc

* [DOCS] Add X-Pack icon for admonition blocks

* [DOCS] Formatting X-Pack blocks in node.asciidoc

* [DOCS] Add xpack icon images to node.asciidoc

* [DOCS] Add final xpack role attributes

* [DOCS] Remove unnecssary xpackicon image

* [DOCS] Add link to X-Pack node settings

* [DOCS] Fix path to X-Pack repository

* [DOCS] Add links to X-Pack node settings

* [DOCS] Fixed text for links to X-Pack node settings

* [DOCS] Change standalone node to dedicated node
2017-06-13 14:03:42 -07:00
Andy Bristol 48696ab544 expose simple pattern tokenizers (#25159)
Expose the experimental simplepattern and 
simplepatternsplit tokenizers in the common 
analysis plugin. They provide tokenization based 
on regular expressions, using Lucene's 
deterministic regex implementation that is usually 
faster than Java's and has protections against 
creating too-deep stacks during matching.

Both have a not-very-useful default pattern of the 
empty string because all tokenizer factories must 
be able to be instantiated at index creation time. 
They should always be configured by the user 
in practice.
2017-06-13 12:46:59 -07:00
Jay Modi 190242fb1b Test: add setting to change request timeout for rest client (#25201)
This commit adds a setting to change the request timeout for the rest client. This is useful as the
default timeout is 30s, which is also the same default for calls like cluster health. If both are
the same then the response from the cluster health api will not be received as the client usually
times out first making test failures harder to debug.

Relates #25185
2017-06-13 12:19:17 -06:00
Jason Tedor 8de6f4e608 Fix secure repository-hdfs tests on JDK 9
The secure repository-hdfs tests fail on JDK 9 because some Hadoop code
reaches into sun.security.krb5. This commit adds the necessary flags to
open the java.security.jgss module. Note that these flags are actually
needed at runtime as well when using secure repository-hdfs. For now we
will punt on how best to help users obtain this when running on JDK 9
with this plugin.

Relates #25205
2017-06-13 13:26:48 -04:00
Alexander Kazakov a7dafdaa05 Add target_field parameter to gsub, join, lowercase, sort, split, trim, uppercase (#24133)
Closes #23682 #23228
2017-06-13 09:40:44 -07:00
Simon Willnauer bc7ec68e76 Add Cross Cluster Search support for scroll searches (#25094)
To complete the cross cluster search capabilities for all search types and
function this change adds cross cluster search support for scroll searches.
2017-06-13 17:22:49 +02:00
Boaz Leskes d3c97615c1 Adapt skip version in rest-api-spec/test/indices.rollover/20_max_doc_condition.yml
The relevant change was backported.
2017-06-13 14:46:15 +02:00
Sergey Galkin 1c95cbc4e8 Rollover max docs should only count primaries (#24977)
max_doc condition for index rollover should use document count only from primary shards 

Fixes #24217
2017-06-13 14:30:46 +02:00
Simon Willnauer 01d7c217f6 Add remote cluster infrastructure to fetch discovery nodes. (#25123)
In order to add scroll support for cross cluster search we need
to resolve the nodes encoded in the scroll ID to send requests to the
corresponding nodes. This change adds the low level connection infrastructure
that also ensures that connections are re-established if the cluster is
disconnected due to a network failure or restarts.

Relates to #25094
2017-06-13 14:23:56 +02:00
Simon Willnauer 186c16ea41 Ensure pending transport handlers are invoked for all channel failures (#25150)
Today if a channel gets closed due to a disconnect we notify the response
handler that the connection is closed and the node is disconnected. Unfortunately
this is not a complete solution since it only works for published connections.
Connections that are unpublished ie. for discovery can indefinitely hang since we
never invoke their handers when we get a failure while a user is waiting for
the response. This change adds connection tracking to TcpTransport that ensures
we are notifying the corresponding connection if there is a failure on a channel.
2017-06-13 09:37:05 +02:00
Jason Tedor 99262e26a0 Use synchronized Wildfly shutdown
We need to use the variant of shutdown that blocks until the connection
to Wildfly is closed or we can get spurious build failures.
2017-06-12 21:38:58 -04:00
Russ Cam a0f50e8aa4 Supported Azure Storage account types (#25167)
* Supported Azure Storage account types

Add important note for Azure Storage account types

Relates #20844
2017-06-12 17:03:18 -07:00
Russ Cam f6821c41d8 Add half_float and scaled float (#22988)
to numeric datatypes
(cherry picked from commit 67ea06145a80d5ec52ba55d1f2e1e8287e1882b1)
2017-06-13 09:54:44 +10:00
Lisa Cawley 2f7de46b72 [DOC] Add X-Pack links to Elasticsearch Reference (#25164)
* [DOC] Add X-Pack links to Elasticsearch Reference

* [DOCS] Address alignment of attributes in Versions.asciidoc
2017-06-12 13:43:06 -07:00
Spencer 88591fecac [docs] include two cluster doc pages missing from index (#25180)
* [docs] include two cluster doc pages missing from index

* [rest-api-spec] update link to remote-info docs
2017-06-12 12:33:56 -07:00
Lee Hinman ee1113c902 Tweak AggregatorBase.addRequestCircuitBreakerBytes
This modifies a method Mark added to the AggregatorBase that allows aggregations
to add additional memory tracking for datastructures used during execution. If
an aggregation would like to reclaim circuit breaker reserved bytes by adding a
negative number, `addWithoutBreaking` should be used instead of
`addEstimateBytesAndMaybeBreak`.

Resolves #24511
2017-06-12 12:55:50 -06:00