Commit Graph

6978 Commits

Author SHA1 Message Date
David Pilato baf3bd9224 Don't fail plugin manager test when downloading an actual plugin 2014-01-15 17:10:11 +01:00
Alexander Reelsen 4d68d722a1 Added waiting for yellow cluster state in rest test
In order to prevent rare timing issue, where the creation
of an index happens in the cluster state too late and thus
results in empty mappings.
2014-01-15 17:03:30 +01:00
Clinton Gormley 12a095d797 [DOCS] Tidied up the multi-indices docs 2014-01-15 16:13:38 +01:00
Clinton Gormley 93ba3b5e70 [DOCS] Tidied up layout of setup docs 2014-01-15 15:09:34 +01:00
Lee Hinman 3062e59f51 [DOCS] Fix default setting in circuit breaker documentation 2014-01-15 07:05:05 -07:00
Alexander Reelsen 353d599d05 Increased max map pages for systemd to align with init.d settings in packages 2014-01-15 14:57:00 +01:00
Clinton Gormley a0b993e2dc [DOCS] Tidied up cluster settings docs 2014-01-15 14:51:18 +01:00
Clinton Gormley f8a427e266 [DOCS] Moved fielddata circuit breaker higher up the page 2014-01-15 14:00:08 +01:00
Britta Weber 2f115b8103 update rest spec to be consistent with recent changes
see issue #4071
2014-01-15 00:56:52 +01:00
Britta Weber 6389432b28 Use most recent cluster state to find types in delete mapping
Previously, the cluster state before flushing was used to check which
types map the given types pattern. However, this state might not be
up to date. Instead use the more recent cluster state from clusterState.state()
This fixes a test failure of PercolatorTests.testDeletePercolatorType

Other changes:

- use BoolFilter instead of OrFilter, because it is faster
- throw exception immediately when no type matching the given patterns
  was found in cluster state
2014-01-14 23:06:11 +01:00
Alexander Reelsen a3abcdc93a Consistent APIs: Get field mapping API includes 'mappings'
The get field mapping API now includes a mappings element after the index in its JSON

Added more consistent endpoint /{index}/_mapping/{type}/field/{fields}
and added endpoint /_mapping/{type}/field/{fields}
which are also used in tests

Added rest spec tests for wildcards and _all

Relates #4071

NOTE: This is not yet complete for 1.0. We need to return an empty JSON document instead
of a 404 if the field of an existing index and type is not found. However this is not
possible with the current data structure being returned. Needs to be finished for 1.0.
2014-01-14 22:42:27 +01:00
Alexander Reelsen 349a8be4fd Consistent REST API changes for GETting data
* Made GET mappings consistent, supporting
  * /{index}/_mappings/{type}
  * /{index}/_mapping/{type}
  * /_mapping/{type}
  * Added "mappings" in the JSON response to align it with other responses
* Made GET warmers consistent, support /{index}/_warmers/{type} and /_warmer, /_warner/{name}
  as well as wildcards and _all notation
* Made GET aliases consistent, support /{index}/_aliases/{name} and /_alias, /_aliases/{name}
  as well as wildcards and _all notation
* Made GET settings consistent, added /{index}/_setting/{name}, /_settings/{name}
  as well as supportings wildcards in settings name
* Returning empty JSON instead of a 404, if a specific warmer/
  setting/alias/type is missing
* Added a ton of spec tests for all of the above
* Added a couple of more integration tests for several features

Relates #4071
2014-01-14 22:33:52 +01:00
Andrew Raines b35ca1aa75 Fix disk percent used calc in cat/allocation
Closes #4670.
2014-01-14 15:23:19 -06:00
Andrew Raines 158483554d Shorten epoch to second precision.
Closes #4696.
2014-01-14 15:23:19 -06:00
Igor Motov ba7699a38b Add documentation for index.routing.allocation.*._name and index.routing.allocation.*._id options 2014-01-14 16:20:46 -05:00
Simon Willnauer fb3ea1feb0 Use assertThat instead of plain asserts in MemoryCircuitBreakerTests 2014-01-14 20:38:03 +01:00
Britta Weber 411739fe3b Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071

PUT options for _mapping:

Single type can now be added with

`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`

and

`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`

PUT options for _warmer:

PUT with a single warmer can now be done with

`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`

PUT options for _alias:

Single alias can now be PUT with

`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`

DELETE options _mapping:

Several mappings can be deleted at once by defining several indices and types with

`[DELETE] /{index}/{type}`

`[DELETE] /{index}/{type}/_mapping`

`[DELETE] /{index}/_mapping/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_mapings` can be used.

DELETE options for  _warmer:

Several warmers can be deleted at once by defining several indices and names with

`[DELETE] /{index}/_warmer/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_warmers` can be used.

DELETE options for _alias:

Several aliases can be deleted at once by defining several indices and names with

`[DELETE] /{index}/_alias/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_aliases` can be used.
2014-01-14 20:02:43 +01:00
Simon Willnauer d1a4f889ae Fix DestructiveOperationsIntegrationTests to wait for index to be allocated before closing 2014-01-14 19:38:39 +01:00
Igor Motov 9440655ab9 Fix possible race condition in the restoreIndexWithMissingShards test
Due to a race condition the index creation operation might still try to create an index on the closing node.
2014-01-14 11:05:02 -05:00
Rob Cherry f2710c16eb excluding all fields of an object should not remove parent.
When excluding '*.f1' from `{ "obj": { "f1": 1, "f2": 2 } }` XContentMapValues.filter returns `{ "obj": { "f2": 2}}`. When run on `{ "obj": { "f1" : 1 }}` we should return `{ "obj": { }}` to maintain object structure. People currently need to always check whether `obj` is there or not.

Closes #4715
Closes #4047
Related to #4491
2014-01-14 08:04:09 -08:00
Simon Willnauer 99eae50f9c run mvn clean before smoketesting 2014-01-14 17:00:50 +01:00
Simon Willnauer 6829b67ff0 Fix Release tool to run smoke tests off tags
this commit allows to run the release tool for smoke
testing without being on the actually released branch.
This commit also added a list of plugins that will be installed
for smoke testing to see if the plugin startup mechanism works
correctly.
2014-01-14 16:31:25 +01:00
Benjamin Vetter ba8e012be9 Referring to stop analyzer for stopword docs #329 2014-01-14 11:53:30 +01:00
Benjamin Vetter 22a96e6a18 Added stopwords: _none_ to the docs #329 2014-01-14 11:53:29 +01:00
Igor Motov b987615f5e Improve support for partial snapshots
Fixes #4701. Changes behavior of the snapshot operation. The operation now fails if not all primary shards are available at the beginning of the snapshot operation. The restore operation no longer tries to restore indices with shards that failed or were missing during snapshot operation.
2014-01-13 16:59:21 -05:00
Lee Hinman b379bf5668 Default to not accepting type wrapper in indexing requests
Currently it is possible to index a document as:

```
POST /myindex/mytype/1
{ "foo"...}
```

or as:

```
POST /myindex/mytype/1
{
    "mytype": {
        "foo"...
    }
}
```

This makes indexing non-deterministic and fields can be misinterpreted
as type names.

This changes makes Elasticsearch accept only the first form by default,
ie without the type wrapper. This can be changed by setting
`index.mapping.allow_type_wrapper` to `true`` when creating the index.

Closes #4484
2014-01-13 14:37:00 -07:00
Simon Willnauer a1efa1f7aa Remove `ElasticsearchInterruptedException` and handle interrupt state
correctly.

InterruptedExceptions should be handled by either rethrowing or
restoring the interrupt state (i.e. calling
`Thread.currentThread().interrupt()`). This is important since the
caller of the is method or subequent method calls might also be
interested in this exception. If we ignore the interrupt state the
caller might be left unaware of the exception and blocks again on
a subsequent method.

Closes #4712
2014-01-13 22:17:11 +01:00
Clinton Gormley 0751f0b7c6 [DOCS] Fixed link to tribe.asciidoc 2014-01-13 22:01:12 +01:00
Clinton Gormley 2e79246c1a [DOCS] Added docs for tribe node
Related #4708
2014-01-13 21:53:53 +01:00
Shay Banon 7e5f51d4b1 clean the params before running the next test 2014-01-13 12:28:44 -08:00
Shay Banon e8781d67da add similar concrete path trie tests resolution 2014-01-13 12:27:46 -08:00
Shay Banon 7427ac206c apply comments on tribe code 2014-01-13 12:26:59 -08:00
Andrew Raines e13f55dfca [DOCS] Update cat/indices to reflect ?pri flag 2014-01-13 14:18:27 -06:00
Shay Banon 76319b0cd2 Tribe Node
The tribes feature allowed to create a tribe node that can act as a federated client across multiple clusters.

The tribe node configuration looks something like this:

```
tribe.t1.cluster.name: cluster1
tribe.t2.cluster.name: cluster2
```

The configuration above configure connections to 2 clusters, named `t1`, `t2`. It creates a "node" client to each (so by default, above, multicast discovery is used). The settings for each node client is extracted from the `tribe.[tribe_name]` prefix.

The way the tribe node works is by merging the cluster state from each cluster, and creating a merged view of all clusters. This means all operations work the same, distributed search, suggest, percolation, indexing, ... .

The merged view drops conflicted indices and picks one of them if there are 2 indices with the same name across multiple clusters.

By default, read and write operations are allowed. Master level read operations (cluster state for example), require setting the local flag to true (since there is no elected master). Master level write operations are not allowed (create index, ...).

The tribe node can be configured to block write operations `tribe.blocks.write` to `true`, and metadata operations by setting `tribe.blocks.metadata` to `true`.
closes #4708
2014-01-13 11:08:18 -08:00
markharwood 541059a4d1 Adds a new coerce flag for numeric field mappings which is defaulted to true.
When set to false a new strict mode of parsing is employed which
a) does not permit numbers to be passed as JSON strings in quotes
b) rejects numbers with fractions that are passed to integer, short or long fields.

Closes #4117
2014-01-13 17:58:18 +00:00
Clinton Gormley 2c647b3a82 Revert "[SPEC] Added level param to cluster.state"
This reverts commit 06e5f3dd6f.
2014-01-13 18:07:12 +01:00
Clinton Gormley 06e5f3dd6f [SPEC] Added level param to cluster.state 2014-01-13 18:05:38 +01:00
Clinton Gormley 7779196c8a [SPEC] Updated cluster.state spec 2014-01-13 18:02:15 +01:00
Clinton Gormley b7cddea495 [SPEC] Added level param to cluster.node_stats and indices.stats 2014-01-13 17:40:27 +01:00
Lee Hinman 2341825358 Make type wrapping optional for PUT Mapping API request
Put mapping now supports either of these formats:

POST foo/doc/_mapping
{
  "doc": {
    "_routing": {"required": true},
    "properties": {
      "body": {"type": "string"}
    }
  }
}

or

POST foo/doc/_mapping
{
  "_routing": {"required": true},
  "properties": {
    "body": {"type": "string"}
  }
}

Closes #4483
2014-01-13 09:26:09 -07:00
Simon Willnauer f2f4b72a12 Add missing closing '}' to indices.stats.json 2014-01-13 17:19:13 +01:00
Simon Willnauer a66aead54a Add better error reporting if a json spec can not be parsed 2014-01-13 17:19:13 +01:00
Simon Willnauer 268c2e2563 Fix RandomExceptionCircuitBreakerTests
RandomExceptionCircuitBreakerTests never actually installed
the FilteredAtomicReader that should throw random exceptions
when field data is loaded.
2014-01-13 17:19:13 +01:00
Simon Willnauer ea9e095b57 Encapsulate Operations on SegmentReader in a utils class
This commit adds support to extract SegmentReader instances from
FilteredAtomicReader instances to support reader wrapping in
caches as well.
2014-01-13 17:19:13 +01:00
Simon Willnauer 20f9c96ad2 Add missing #setBreaker setter to NodesStatsRequestBuilder 2014-01-13 17:19:13 +01:00
Clinton Gormley b866c381d5 [TEST] Updated cluster.node_stats test 2014-01-13 17:06:29 +01:00
markharwood 2795f4e55d Standardized use of “*_length” for parameter names rather than “*_len”.
Java Builder apis drop old “len” methods in favour of new “length”
Rest APIs support both old “len: and new “length” forms using new ParseField class to a) provide compiler-checked consistency between Builder and Parser classes and
b) a common means of handling deprecated syntax in the DSL.
Documentation and rest specs only document the new “*length” forms
Closes #4083
2014-01-13 15:59:15 +00:00
Clinton Gormley ed254b56e0 [SPEC] Updated cluster.node_stats and indices.stats 2014-01-13 16:54:51 +01:00
Martijn van Groningen 2dbda7b157 remove System.out.println 2014-01-13 16:53:57 +01:00
Martijn van Groningen c4c918b3a5 Check if entry value can be cast to a Map, if not fail with a better error. 2014-01-13 16:47:35 +01:00