Commit Graph

23943 Commits

Author SHA1 Message Date
Christoph Büscher 1eedb4c033 Resolve missing imports due to changes in master 2016-08-16 11:48:28 +02:00
Christoph Büscher fe2bfc3a27 Merge branch 'master' into feature/rank-eval 2016-08-16 10:42:55 +02:00
Ryan Ernst 8d2770cd98 Merge pull request #19876 from rjernst/gradle_pom_runtime_deps
Build: Fix compile time deps in poms and simplify transitive exclusions
2016-08-15 21:53:53 -07:00
Ryan Ernst 0996ae03a4 Merge pull request #19996 from rjernst/plugin_location
Plugins: Update official plugin location with unified release
2016-08-15 20:36:01 -07:00
Nik Everett 1452ab4b9f Squash the rest of o.e.rest.action
Squashes all the subpackages of `org.elasticsearch.rest.action` down to
the following:
* `o.e.rest.action.admin` - Administrative actions
* `o.e.rest.action.cat` - Actions that make tables for `grep`ing
* `o.e.rest.action.document` - Actions that act on documents
* `o.e.rest.action.ingest` - Actions that act on ingest pipelines
* `o.e.rest.action.search` - Actions that search

I'm tempted to merge `search` into `document` but the `document`
package feels fairly complete as is and `Suggest` isn't actually always
about documents either....

I'm also tempted to merge `ingest` into `admin.cluster` because the
latter contains the actions for dealing with stored scripts.

I've moved the `o.e.rest.action.support` into `o.e.rest.action`.

I've also added `package-info.java`s to all packges in `o.e.rest`. I
figure if the package is too small to deserve a `package-info.java` file
then it is too small to deserve to be a package....

Also fixes checkstyle in all moved classes.
2016-08-15 21:06:32 -04:00
chengpohi 2adc2a1971 Enable BoostingQuery with FVH highlighter (#19984)
* Enable BoostingQuery with FVH highlighter
* apply boost with negativeBoost
* flatten boosting query with its own boost and update boost query to a single layer
2016-08-15 21:00:16 -04:00
Nicholas Knize a93af8651c add geo distance script breaking changes to migration docs 2016-08-15 19:12:24 -05:00
Nik Everett 4f262ce11e Clear some more static state in tests
This was causing CI build failures that didn't reproduce consistently
locally. Hopefully this will fix the error on CI.
2016-08-15 18:51:17 -04:00
Nik Everett eb9b84e6c3 Fix broken test
Randomized testing requires that we clean all the static state
in test classess.
2016-08-15 17:27:01 -04:00
Luca Cavanna 8804035205 Restore assignment of time value when deserializing a scroll instance (#19977)
* Assign scroll keepAlive when deserializing

The scroll time value was never assign when deserializing from the transport layer, meaning that it would always be null when received from another node, although the originating search request might have it set to some value.

* add tests for SearchRequest serialization and fail fast with illegal arguments

To ease testing, also introduced equals, hashcode and toString methods in SearchRequest and Scroll.

The serialization test brought up a few wrong assumptions about non null instance members, for which some null checks were needed to avoid NPEs when serializing.

* make Scroll implement Writeable rather than Streamable

* [TEST] add serialization test for ShardSearchTransportRequest

This also covers ShardSearchLocalRequest implicitly as most of the serialization code is in it.
2016-08-15 17:26:48 -04:00
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
Tal Levy 84bf24b1e9 remove ability to set field value in script-processor configuration (#19981) 2016-08-15 10:57:39 -07: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
Christoph Büscher a7e56d7fa5 Merge branch 'master' into feature/rank-eval 2016-08-15 11:26:34 +02: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
Nik Everett 7542ef3173 [docs] Don't allow `[source,javascript]`
The syntax highlighter doesn't support it. Just use `js`.
2016-08-12 17:08:43 -04:00
Nik Everett ffd226efa0 Add `// NOTCONSOLE` to docs
We have 1074 snippets that look like they should be converted to
`// CONSOLE`. At least that is what `gradle docs:listConsoleCandidates`
says. This adds `// NOTCONSOLE` to explicitly mark snippets that
*shouldn't* be converted to `// CONSOLE`. After marking the blindingly
obvious ones this cuts the remaining snippet count to 1032.
2016-08-12 16:49:57 -04:00
Lee Hinman f832eaa6d2 Merge remote-tracking branch 'dakrone/handle-groovy-errors-better' 2016-08-12 13:07:13 -06:00
Lee Hinman aab8c1f032 Catch AssertionError and NoClassDefFoundError in groovy scripts
Previously, we only caught subclasses of Exception, however, there are
some cases when Errors are thrown instead of Exceptions. These two cases
are `assert` and when a class cannot be found.

Without this change, the exception would bubble up to the
`uncaughtExceptionHandler`, which would in turn, exit the JVM
(related: #19923).

A note of difference between regular Java asserts and Groovy asserts,
from http://docs.groovy-lang.org/docs/latest/html/documentation/core-testing-guide.html

"Another important difference from Java is that in Groovy assertions are
enabled by default. It has been a language design decision to remove the
possibility to deactivate assertions."

In the event that a user uses an assert such as:

```groovy
def bar=false; assert bar, "message";
```

The GroovyScriptEngineService throws a NoClassDefFoundError being unable
to find the `java.lang.StringBuffer` class. It is *highly* recommended
that any Groovy scripting user switch to using regular exceptions rather
than unconfiguration Groovy assertions.

Resolves #19806
2016-08-12 13:06:49 -06: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
Areek Zillur a4f4525955 Merge pull request #19969 from chengpohi/master
fix CompletionSuggestion test failed caused by shard is 1
2016-08-12 14:20:21 -04:00
Clinton Gormley 8e5ee2c6d5 RESTART_ON_UPGRADE incorrectly named ES_RESTART_ON_UPGRADE in sysconfig (#19976)
Closes #19950
2016-08-12 19:19:30 +02:00
Xiang Chen 77f28dbdde fix CompletionSuggestion test failed caused by shard is 1 2016-08-13 00:20:46 +08:00
Clinton Gormley 15c96df5b5 Replaced "true" with true in snapshot restore docs
Closes #19947
2016-08-12 16:56:56 +02: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 452691ae9d Merge pull request #19949 from jimferenczi/slow_log_search
Add shardId and node name in search slow log
2016-08-12 15:33:43 +02: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 c9722c4b08 Merge pull request #19972 from jimferenczi/dfs_explain
Fix explain output for dfs query
2016-08-12 12:22:13 +02: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
Christoph Büscher b7af7c21d1 Adapt to changes in master 2016-08-12 11:03:55 +02:00
Christoph Büscher 064def76eb Merge branch 'master' into feature/rank-eval 2016-08-12 10:40:14 +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
Gytis Šk 8a97f05e41 Fix typos in inner-hits documentation (#19910) 2016-08-11 21:15:11 +02:00
Luca Cavanna a80a35ebc4 Merge pull request #19961 from javanna/fix/reindex_repleaceable
update and delete by query requests to implement IndicesRequest.Replaceable
2016-08-11 21:10:58 +02:00
Tal Levy bf046f8f93 update ingest date index name processor with runnable CONSOLE examples (#19935) 2016-08-11 11:36:14 -07: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
javanna 4424d2263f UpdateByQueryRequest to implement IndicesRequest.Replaceable rather than CompositeIndicesRequest
Update by query is a shortcut to search + index. UpdateByQueryRequest gets serialized on the transport layer only when the transport client is used. Given that the request supports wildcards and allows to set its indices, it should implement IndicesRequest.Repleaceable. implementing CompositeIndicesRequest makes little sense as the indices that the request works against depend entirely on the inner search request.
2016-08-11 18:11:26 +02:00
javanna 11d770dde3 DeleteByQueryRequest to implement IndicesRequest.Replaceable
Delete by query is a shortcut to search + delete. DeleteByQueryRequest gets serialized on the transport layer only when the transport client is used. Given that the request supports wildcards and allows to set its indices, it should implement IndicesRequest.Repleaceable
2016-08-11 18:11:26 +02:00
Jason Tedor d7dbb2b595 Fix handling of spaces for jvm.options on Windows
This commit fixes the handling of spaces in the path to the jvm.options
file on Windows. The issue is that the extraneous set of quotes were
included as part of the value of ES_JVM_OPTIONS thus confusing further
downstream commands.

Relates #19951
2016-08-11 11:23:22 -04:00
Nik Everett e07e5d66fa Make reindex and lang-javascript compatible
Fixes two issues:
1. lang-javascript doesn't support `executable` with a `null` `vars`
parameters. The parameter is quite nullable.
2. reindex didn't support script engines who's `unwrap` method wasn't
a noop. This didn't come up for lang-groovy or lang-painless because
both of those `unwrap`s were noops. lang-javascript copys all maps that
it `unwrap`s.

This adds fairly low level unit tests for these fixes but dosen't add
an integration test that makes sure that reindex and lang-javascript
play well together. That'd make backporting this difficult and would
add a fairly significant amount of time to the build for a fairly rare
interaction. Hopefully the unit tests will be enough.
2016-08-11 09:54:03 -04:00
Christoph Büscher cac4961ef4 Fix test failure because of broken RankEvalResponse serialization
The introduction of RatedDocumentKey accidentally broke the response
serialization because it cannot be written using writeGenericValue().
2016-08-11 15:42:18 +02:00