Commit Graph

14689 Commits

Author SHA1 Message Date
Clinton Gormley 7efc419041 Revert "Revert "disable license checker on windows for now, jenkins boxes have perl problems""
This reverts commit e2cbec185b.
2015-08-07 16:47:52 +02:00
javanna 56c0b46f96 [TEST] remove duplicated tests from SearchQueryIT
After merging filters and queries, tests against indices filter and indices query became exactly the same. we can remove one copy then.
2015-08-07 16:04:51 +02:00
Alexander Reelsen b6016b6e1e Bats testing: Remove useless systemctl check
Bats testing uncovered a useless systemctl check, that resulted in an
error, because the systemctl file was uninstalled, but we hoped to
check for an explicetely configured SystemExitCode.

In addition we did not reload the systemctl configuration when uninstalling
elasticsearch, which now is fixed as well.

Closes #12682
2015-08-07 14:42:38 +02:00
Clinton Gormley e2cbec185b Revert "disable license checker on windows for now, jenkins boxes have perl problems"
This reverts commit 6e9d8671bc.
2015-08-07 14:27:24 +02:00
Simon Willnauer f1e80b7f9c Add basic tests for sharded JAR
this commit adds a simple integration test that starts a
node from a shaded jar, indexes a doc and retrieves it. It
also has some basic unittests that try to load shaded classes and ensure
that their counterpart is not in the classpath.

Closes #12711
2015-08-07 14:14:33 +02:00
Nik Everett 8e6e8ff234 Let OSX build rpms for linux
Closes #12701
2015-08-07 08:11:34 -04:00
Nik Everett f1fc2efcc8 Packaging: rpm and deb create scripts directory
Elasticsearch will create this if it doesn't exist if it cant but because
it doesn't own /etc/elasticsearch when installed by rpm and deb it can't
create /etc/elasticsearch/scripts.

Closes #12702
2015-08-07 08:10:53 -04:00
Sylvain Zimmer c2f774ac57 Warning in the docs for negative histogram values
As requested in https://github.com/elastic/elasticsearch/issues/8082#issuecomment-127962374
2015-08-07 13:10:03 +02:00
Clinton Gormley db541d6fbe Docs: Add warning about allow_primary to the cluster reroute docs
Closes #12503
2015-08-07 12:03:19 +02:00
Simon Willnauer d0b2566345 Make RoutingNodes read-only by default
ClusterState has 3 different methods to access RoutingNodes:
 * #routingNodes() - mutable version
 * #getRoutingNodes() - delegates to #getReadOnlyRoutingNodes()
 * #getReadOnlyRoutingNodes() - it's docs say `NOTE, the routing nodes are mutable, use them just for read operations`

The latter also reuses the instance that it creates. This has several problems beside the obvious:
 * creating RoutingNodes is costly and should be done only if really needed ie. use cached version as much as possible
 * the common case is ReadOnly but all kinds of things are called
 * mutable version are only needed in one place and should only be used in the AllocationService
 * RoutingNodes can freeze it's ShardRoutings but doesn't
 * RoutingNodes should check if it's read-only or not

This commit fixed all the problems and special cases the mutable case such that all accesses via ClusterState#getRoutingNodes()
is read-only and RoutingNodes enforces this.
2015-08-07 09:48:42 +02:00
Adrien Grand 137bfaaeff Merge pull request #12707 from jpountz/enhancement/filters_function_score_needs_score
Only compute scores when necessary with FiltersFunctionScoreQuery.
2015-08-07 08:53:19 +02:00
Robert Muir f50531c403 Revert "Revert "disable license checker on windows for now, jenkins boxes have perl problems""
This reverts commit 633b4868d9.
2015-08-06 23:38:24 -04:00
Robert Muir 633b4868d9 Revert "disable license checker on windows for now, jenkins boxes have perl problems"
This reverts commit 6e9d8671bc.

Lets see if they are up for the task now.
2015-08-06 22:17:45 -04:00
Robert Muir 6e7d1a828d fix totally broken batch file. thank you jenkins. windows you still suck. 2015-08-06 18:27:06 -04:00
Robert Muir 6e9d8671bc disable license checker on windows for now, jenkins boxes have perl problems 2015-08-06 18:01:04 -04:00
Adrien Grand 2db1db0686 Tests: disable randomly-enabled custom data paths to make tests passing against an external cluster. 2015-08-06 22:28:40 +02:00
Robert Muir 91f7aaaf4c Merge pull request #12703 from rmuir/integ_randomization
Support jenkins randomization in integration tests
2015-08-06 15:48:18 -04:00
Adrien Grand 5cad559914 Only compute scores when necessary with FiltersFunctionScoreQuery.
This was just done with FunctionScoreQuery, but FiltersFunctionScoreQuery works
in a similar way.
2015-08-06 21:42:46 +02:00
Robert Muir d1a5068b77 Merge branch 'master' into integ_randomization 2015-08-06 14:51:00 -04:00
Robert Muir 7414d19d28 Support jenkins randomization in integration tests 2015-08-06 14:48:27 -04:00
Adrien Grand 4bde564ab9 Merge pull request #12582 from jpountz/plugin/mapper_size
Move the `_size` mapper to a plugin.
2015-08-06 20:36:46 +02:00
Adrien Grand 5dd5936fad Move the `_size` mapper to a plugin.
This is one of our esoteric metadata mappers so I think we should distribute
it in a plugin rather than in elasticsearch core.

This introduces one limitation: the value of the `_size` parameter is not
retrievable for documents that are only in the transaction log.
2015-08-06 20:35:22 +02:00
Clinton Gormley 9da8822aed Docs: Made multi-fields more prominent 2015-08-06 20:09:42 +02:00
Adrien Grand 00093a21dc Merge pull request #12294 from jpountz/fix/multi_match_boost
`multi_match` query applies boosts too many times.
2015-08-06 19:07:44 +02:00
Adrien Grand 8d5fff37ae `multi_match` query applies boosts too many times.
The `multi_match` query groups terms that have the same analyzer together and
then applies the boost of the first query in each group. This is not necessary
given that boosts for each term are already applied another way.
2015-08-06 19:07:12 +02:00
Clinton Gormley 0eb2ab915d Docs: Fixed date format default option 2015-08-06 19:05:09 +02:00
Clinton Gormley 08687dfa3d Docs: Fixed typo on string datatype page 2015-08-06 18:59:37 +02:00
Clinton Gormley 52663071c0 Docs: Removed redundant docs from field datatypes page. 2015-08-06 18:52:54 +02:00
Adrien Grand b59918f29d Merge pull request #12695 from jpountz/enhancement/script_needs_scores
Allow scripts to expose whether they use the `_score`.
2015-08-06 18:47:18 +02:00
Clinton Gormley 7977979146 Docs: Reorganised the mapping home page 2015-08-06 18:44:07 +02:00
Robert Muir d61d775f19 Merge pull request #12696 from rmuir/better_jvm_check_error
Improve jvmcheck error failure
2015-08-06 12:35:55 -04:00
Robert Muir 1ca97934b5 Improve jvmcheck error failure
Versions can be tricky with linux vendors and such. To help debug any possible issues, we should output a better version.

Today:
```
[elasticsearch] java.lang.RuntimeException: Java version: 1.7.0_55 suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
[elasticsearch] Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
[elasticsearch] If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JAVA_OPTS environment variable.
[elasticsearch] Upgrading is preferred, this workaround will result in degraded performance.
[elasticsearch]     at org.elasticsearch.bootstrap.JVMCheck.check(JVMCheck.java:121)
[elasticsearch]     at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:270)
[elasticsearch]     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:28)
```

With patch:
```
java.lang.RuntimeException: Java version: Oracle Corporation 1.7.0_40 [Java HotSpot(TM) 64-Bit Server VM 24.0-b56] suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JAVA_OPTS environment variable.
Upgrading is preferred, this workaround will result in degraded performance.
	at org.elasticsearch.bootstrap.JVMCheck.check(JVMCheck.java:121)
	at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:270)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:28)
```
2015-08-06 12:22:04 -04:00
Lee Hinman 0a1c9de075 Merge remote-tracking branch 'dakrone/avoid-extra-reroutes-FP' 2015-08-06 10:07:41 -06:00
Clinton Gormley 666fe4d6a5 Docs: Date-math should be on common options 2015-08-06 17:49:30 +02:00
Adrien Grand b16e2d95af Allow scripts to expose whether they use the `_score`.
This commit adds a new API to allow scripts to say whether they need scores.
In practice, only the `expression` script engine makes use of it correctly,
other engines just return `true` since they can't predict whether they'll
need scores. This should make scripted aggregations and `function_query`
faster as we'll now be able to pass needsScores=false to Query.createWeight.
2015-08-06 17:25:51 +02:00
Clinton Gormley ac2b8951c6 Docs: Mapping docs completely rewritten for 2.0 2015-08-06 17:24:51 +02:00
Jason Tedor 40cd460647 Merge pull request #12691 from jasontedor/fix/12683
Do not track named queries that are null
2015-08-06 09:33:29 -04:00
Jason Tedor e5786d2d82 Do not track named queries that are null
Adding a named query that is null can lead to a NullPointerException
when copying the named queries. This is due to an implementation detail
in QueryParseContent.copyNamedQueries. In particular, this method uses
com.google.common.collect.ImmutableMap.copyOf. A documented requirement
of ImmutableMap is that none of the entries have a null key nor null
value. Therefore, we should not add such queries to the namedQueries
map. This will not change any behavior since Map.get returns null if no
entry with the given key exists anyway.

Closes #12683
2015-08-06 09:31:51 -04:00
Adrien Grand 8590fa49a6 Merge pull request #12693 from jpountz/enhancement/speed_up_function_score_query_when_replacing_score
Speed up the `function_score` query when scores are not needed.
2015-08-06 15:14:44 +02:00
Adrien Grand 23a3db8bb6 Speed up the `function_score` query when scores are not needed.
This change improves the `function_score` query to not compute scores at all
when they are not needed, and to not compute scores on the underlying query
when the combine function is to replace the score with the scores of the
functions.
2015-08-06 15:04:48 +02:00
Robert Muir 57b1b72af6 Factor out waiting for easier redefinition 2015-08-06 08:28:08 -04:00
javanna 6f13171d50 [TEST] add NamedWriteableRegistry argument to AbstractSimpleTransportTests#build method 2015-08-06 12:56:28 +02:00
javanna 63d18d5e05 Make FilterInputStream abstract 2015-08-06 12:55:57 +02:00
javanna e1e9e1a6e1 Transport: allow to de-serialize arbitrary objects given their name
This commit makes it possible to serialize arbitrary objects by having them extend Writeable. When reading them though, we need to be able to identify which object we have to create, based on its name. This is useful for queries once we move to parsing on the coordinating node, as well as with aggregations and so on.

Introduced a new abstraction called NamedWriteable, which is supported by StreamOutput and StreamInput through writeNamedWriteable and readNamedWriteable methods. A new NamedWriteableRegistry is introduced also where named writeable prototypes need to be registered so that we are able to retrieve the proper instance of the writeable given its name and then de-serialize it calling readFrom against it.

Closes #12393
2015-08-06 12:25:27 +02:00
Simon Willnauer d0abffc9ac Add unittest for DiskThresholdDecider#getShardSize / #sizeOfRelocatingShards
This commit adds a basic unittest for the shard size routines and simplifies
some object creation.
2015-08-06 10:35:12 +02:00
Robert Muir 3f7e9d2dc6 Merge pull request #12681 from rmuir/improve_integ2
Get plugin smoketester running in jenkins.
2015-08-05 22:33:53 -04:00
Robert Muir 0ecd7b8ccf Merge pull request #12668 from rmuir/configure_script
Add path.scripts directory
2015-08-05 22:33:30 -04:00
Robert Muir 354a32b05d remove annoying maven warning 2015-08-05 22:08:12 -04:00
Robert Muir 5fe49e4420 cleanup skipping everywhere 2015-08-05 21:45:09 -04:00
Robert Muir c62f0655d3 fix/cleanup pidfile stuff 2015-08-05 20:34:24 -04:00