Commit Graph

9790 Commits

Author SHA1 Message Date
Boaz Leskes f885abbedb testDanglingIndicesConflictWithAlias - wait for node left to be processed
O.w. delete index command may time out waiting for the node that left to confirm deletion
2014-10-15 18:08:15 +02:00
Ryan Ernst c9d66bf486 Tweaking upgrade test to improve reliability. 2014-10-15 09:03:39 -07:00
Chris Earle 2d8a140ed8 Add file descriptor details to cat/nodes
cat/nodes currently does not report any details related to file descriptors. This adds the current number in use, the maximum number available as well as their ratio (percentage) to cat/nodes as hidden-by-default metrics. In addition, this also adds current heap usage (as a non-percentage of ts max) and ram usage (as a non-percerntage of its max) to allow tools to provide more granularity.

Closes #7652
2014-10-15 10:18:41 -05:00
Chris Earle e88d42db2b Adding ScoreTypesTest missing license header 2014-10-15 09:54:00 -05:00
Chris Earle 9b84ad3c7b Adding "min" score mode to parent-child queries
Support for "max", "sum", and "avg" already existed.
2014-10-15 09:23:36 -05:00
Nik Everett 5dc5849922 Docs: Add plugin to list
This plugin provides trigram accelerated regular expression search for when
you need reasonably fast arbitrary matching.

Closes #7997
2014-10-15 13:56:35 +02:00
Boaz Leskes dabbefd311 Internal: dangling indices import ignores aliases
Dangling indices are indexes found on disk which are not part of the cluster state. By default, we don't delete them but rather import them into the cluster state in order to not accidentally delete data and also allow for the ease of copying index data folders from one cluster to another. Currently, the import logic doesn't check for existing aliases of the same name as the imported dangling index, causing both an index and an alias with the same name.

 This commit add a protection against this. Note that the index is still kept as dangling and is only deleted from disk after `gateway.local.dangling_timeout` has passed (2 hours).

 We also change the log message indicating deletion of dangling indices to a `WARN` level.

 Closes #8059
2014-10-15 13:47:56 +02:00
Clinton Gormley 6a180d1803 Docs: Update highlighting.asciidoc
Added note about how to highlight on the `_all` field

Closes #7991
2014-10-15 13:45:56 +02:00
Henrik Nordvik fdbb62b1ab Docs: Fix curl statements in query-cache.asciidoc
Closes #7989
2014-10-15 13:16:20 +02:00
Lee Hinman 9e7fba9a7b Log exception thrown in ScriptEngineService.scriptRemoved
Guava would swallow the exception and log it itself if we bubbled it up,
so we catch and log it ourselves to use our logging infrastructure.
2014-10-15 11:38:37 +02:00
Simon Willnauer 8dddac3195 [CORE] Add cluster and index state checksums
This commit adds checksumming for cluster and index states. It moves
from a plain XContent based on-disk format to a more structured binary
format including a header and footer as well as a CRC32 checksum for
each of these files. Since previous versions didn't write any format
identifier etc. this commit adds a file extension `.st` for states
that have header/footer and checksum.
This commit also moves over to write temporary files and moves them into
place with an atomic move operation. This commit also serializes and
deserializes the states without materilazing them into opaque memory.

Closes #7586
2014-10-15 11:28:50 +02:00
David Pilato 6ef6109ce9 Tests: check maven central download service is up before running plugin manager test
Though we check that internet connection is fine and that the service is available, it could happen that some services are not available.

```java
assumeTrue(isDownloadServiceWorking("search.maven.org", 80, "/"));
singlePluginInstallAndRemove("org.elasticsearch/elasticsearch-transport-thrift/2.4.0", null);
```

In that case, the first check was successful but downloading thrift plugin from maven central download services was not successful.

This is not an issue with the plugin manager itself but sometimes the test could fail.

Adding a check that actual download service in Maven central works:

```java
assumeTrue(isDownloadServiceWorking("repo1.maven.org", 443, "/maven2/org/elasticsearch/elasticsearch-transport-thrift/2.4.0/elasticsearch-transport-thrift-2.4.0.pom"));
```
2014-10-15 11:19:20 +02:00
Michael McCandless 5192b1f872 Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

Closes #8087
2014-10-15 04:47:56 -04:00
sp836490 517caa0c6f Update cjk-bigram-tokenfilter.asciidoc 2014-10-15 11:54:19 +09:00
Simon Willnauer ac4b39bd8f [CORE] Be more explicit if index.version.created is not set
Today we use the current version which might enable features that are
not supported. We should throw an exception if this setting is not
present for any index.

Closes #8018
2014-10-14 20:51:54 +02:00
Clinton Gormley 7e916d0b8b Update completion-suggest.asciidoc
Documented the `size` parameter in the completion suggester query
2014-10-14 18:47:32 +02:00
Michael McCandless 6166911d8a Test: make test less evil to not cause OOME 2014-10-14 11:27:49 -04:00
Jake Buob cb381b4645 Docs: Fix (another) Idaho spelling
Closes #7912
2014-10-14 13:29:35 +02:00
Hang Su dd62e50861 fix mismatched curly bracket 2014-10-14 13:24:44 +02:00
Clinton Gormley eaa0479261 Docs: Added elasticsearch-dsl-py
Closes #7812
Closes #7813
2014-10-14 13:20:38 +02:00
Adrien Grand cd8e02351b Internal: Fix serialization of PendingClusterTask.timeInQueue.
This parameter is serialized as a vLong while it could sometimes be negative.

Close #8077
2014-10-14 13:17:43 +02:00
Clinton Gormley 66cd3ad17e Docs: Update object-type.asciidoc to make object type more explicit
Closes #7646
2014-10-14 13:16:37 +02:00
Adrien Grand 39ff60e1fd Tests: Add more logging to ExistsMissingTests. 2014-10-14 13:07:25 +02:00
Simon Willnauer bbda203aef [CORE] Remove leftover unused constants 2014-10-14 10:46:03 +02:00
Lee Hinman 2c6d31df36 Clear the GroovyClassLoader cache before compiling
Since we don't use the cache, it's okay to clear it entirely if needed,
Elasticsearch maintains its own cache for compiled scripts.

Adds loader.clearCache() into a listener, the listener is called when a
script is removed from the Guava cache.

This also lowers the amount of cached scripts to 100, since 500 is
around the limit some users have run into before hitting an out of
memory error in permgem.

Fixes #7658
2014-10-14 10:19:34 +02:00
Suyog Rao 82b16ae0ad Doc: Clarify that index.routing.allocation.total_shards_per_node means both primary and replica shards
Closes #8002
2014-10-13 18:08:23 -07:00
Simon Willnauer d92ee348fd [CORE] Simplify discovery node initialization if version is unknown
Today it's easy to use the wrong version when initializing DiscoveryNode
instances. This commit adds javadocs and a utility constant to
initialize DiscoveryNode instances if the the remotes node version is
unknown.

Closes #8051
2014-10-13 12:30:31 +02:00
Michael McCandless cea72705cf Test: re-enable testUpgrade_0_20 2014-10-13 06:01:46 -04:00
Boaz Leskes cbcc4ec616 Logging: add shard id to logging in InternalIndexService.removeShard 2014-10-13 09:33:46 +02:00
Simon Willnauer 4d598f72fb [TEST] Remove explicit network mode - not needed here 2014-10-13 09:25:46 +02:00
Ryan Ernst 5ec87ca4a1 Temporarily ignore 0.20 upgrade test until it can be made less flaky. 2014-10-12 19:55:51 -07:00
Ryan Ernst 538c44b6bf Admin: Fix upgrade logic to work on lucene major version differences.
Also improved upgrade tests, and added test against static ES 0.20 index
which used Lucene 3.6.

closes #8013
2014-10-12 19:04:59 -07:00
Igor Motov 28a7d63951 Throw parsing exception if terms filter or query has more than one field
Closes #5014
2014-10-12 15:44:02 -04:00
Ryan Ernst 08ba5baab0 Tests: Add assumption to restrict upgrade test from running against
invalid backcompat versions.
2014-10-12 11:35:11 -07:00
Adrien Grand 87497c92ca Docs: Add missing link to the 2.0 migration guide. 2014-10-12 17:54:21 +02:00
Clinton Gormley dfcc0f97f0 Spec: Removed flush and max_num_segments from indices.upgrade 2014-10-11 17:19:06 +02:00
Clinton Gormley 1e47f02891 Rest: Added missing parameters to indices.upgrade 2014-10-11 16:40:45 +02:00
Clinton Gormley 0d3d541d62 Docs: Tidied the upgrade indices docs 2014-10-11 16:22:24 +02:00
Zachary Tong 7821387cca Revert "Aliases: Throw exception if index is null when creating alias"
This reverts commit ee857bc073.
2014-10-10 17:50:30 -04:00
Zachary Tong ee857bc073 Aliases: Throw exception if index is null when creating alias
Fixes a bug where alias creation would allow `null` for index name, which thereby
applied the alias to _all_ indices.  This patch makes the validator throw an
exception if the index is null.

```bash
POST /_aliases
{
   "actions": [
      {
         "add": {
            "alias": "empty-alias",
            "index": null
         }
      }
   ]
}
```
```json
{
   "error": "ActionRequestValidationException[Validation Failed: 1: Alias action [add]: [index] may not be null;]",
   "status": 400
}
```

The reason this bug wasn't caught by the existing tests is because
the old test for nullness only validated against a cluster which had
zero indices.  The null index is translated into "_all", and since
there are no indices, this fails because the index doesn't exist.
 So the test passes.

However, as soon as you add an index, "_all" resolves and you get the
situation described in the original bug report:  null index is
accepted by the alias, resolves to "_all" and gets applied to everything.

Fixes #7976
2014-10-10 16:47:40 -04:00
Zachary Tong 4e2dd770aa Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes #7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```
2014-10-10 16:29:23 -04:00
javanna 142d7bdd81 Internal: fixed bw comp in ShardSearchTransportRequest
Original indices were introduced in 1.4.0.Beta1 as optional, preceded by a boolean flag that told whether they were empty or not. We have to keep serializing as optional only when reading and writing from/to 1.4.0.Beta1, although the original indices are not optional whenever we go and serialize the request they belong to (which is why the boolean got removed in 1.4.0).
2014-10-10 21:47:45 +02:00
javanna 694cc08625 [TEST] bump benchmark apis version to 2.0.0 2014-10-10 20:53:19 +02:00
Ryan Ernst 6ac094c038 Add forgotten include for upgrade docs.
See #7922
2014-10-10 10:55:45 -07:00
Ryan Ernst e2c50c033a Add link to new upgrade docs from indices page.
See #7922.
2014-10-10 10:52:11 -07:00
Clinton Gormley 20a901964c Spec: Added human flag to indices.get_upgrade 2014-10-10 17:26:36 +02:00
Simon Willnauer 1792822bae [CORE] Log if CircuitBreaker is tripping
Today we only throw an exception which might not be logged at all. This
commit adds debug logging if we are tripping a CB.

Closes #8050
2014-10-10 13:02:46 +02:00
Adrien Grand 491a48e55b Docs: Remove the note that fielddata doesn't support filtering.
This particular note was about fielddata filtering but could cause confusion
that fields that have doc values enabled cannot be used for filtering (as in
a `filtered_query`).
2014-10-10 10:50:47 +02:00
Colin Goodheart-Smithe e9f05eed80 Aggregations: Fixes scripted metrics aggregation when used as a sub aggregation
The scripted metric aggregation is now a PER_BUCKET aggregation so that parent buckets are evaluated independently. Also the params and reduceParams are copied for each instance of the aggregator (each parent bucket) so modifications to the values are kept only within the scope of its parent bucket

Closes #8036
2014-10-10 08:54:26 +01:00
Michael McCandless 101ea31fdf Tests: move thread stacks on failure to a RunListener, so it actually works 2014-10-09 18:23:26 -04:00