Commit Graph

7266 Commits

Author SHA1 Message Date
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
mrsolo 3e28f417e7 license extractor
extract dependency license information
2014-01-13 16:04:31 -08: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
Martijn van Groningen 2ea93a6ad9 CompletionFieldMapper.Builder should make a copy of the default FieldType and set the builder field. 2014-01-13 16:47:35 +01:00
Andrew Raines 2c8baeaa4a Support sibling columns, with _cat/indices?pri as first go.
% curl localhost:9200/_cat/indices\?h=health,index,rep,docs.count,ss,cs,fm\&v\&pri
health index   rep docs.count      ss  pri.ss cs pri.cs     fm pri.fm
green  wiki      1       6401 302.9mb 151.4mb 0b     0b 25.1mb     0b
green  twitter   1      11434    64mb    32mb 0b     0b     0b     0b

Closes #4689.
2014-01-13 09:45:26 -06:00
Simon Willnauer 24a52f155d Remove ancient `engine.robin.refresh_interval`
Closes #4706
2014-01-13 16:30:15 +01:00
Martijn van Groningen 4754a83571 Added test with awaits annotation that exposes a merge mapping issue.
If the path_type is set to `just_name` in a multi_field typed field and that field is updated (for example another multi field is added) then if the path isn't specified again the path_type isn't taken into account and full path names are generated.
2014-01-13 16:29:13 +01:00
Simon Willnauer 8247e4beae Rename RobinEngine and friends to InternalEngine
Closes #4633
2014-01-13 15:49:10 +01:00
LightGuard e89d5d0d86 Fixing up code block delimeters for asciidoctor
You can now successfully run the docs through asciidoctor
2014-01-13 15:26:53 +01:00
Simon Willnauer 7f63ddf94e Default stopwords list should be `_none_` for all but language-specific analyzers
`standard_html_strip` and `pattern` analyzer support stopwords which are
set to the default `english` stopwords by default. Those analyzers
should not use stopwords by default since they are language neutral

Closes #4699
2014-01-13 14:44:10 +01:00
Clinton Gormley 0916372520 Fix YAML in test/indices.open/20_multiple_indices.yaml 2014-01-13 13:17:30 +01:00
Adrien Grand 5c237fe834 Add new option `min_doc_count` to terms and histogram aggregations.
`min_doc_count` is the minimum number of hits that a term or histogram key
should match in order to appear in the response.

`min_doc_count=0` replaces `compute_empty_buckets` for histograms and will
behave exactly like facets' `all_terms=true` for terms aggregations.

Close #4662
2014-01-13 10:09:38 +01:00
Martijn van Groningen 943b62634c Replaced the multi-field type in favour for the multi fields option that can be set on any core field.
When upgrading to ES 1.0 the existing mappings with a multi-field type automatically get replaced to a core field with the new `fields` option.

If a `multi_field` type-ed field doesn't have a main / default field, a default field will be chosen for the multi fields syntax. The new main field type
will be equal to the first `multi_field` fields' field or type string if no fields have been configured for the `multi_field` field and in both cases
the default index will not be indexed (`index=no` is set on the default field).

If a `multi_field` typed field has a default field, that field will replace the `multi_field` typed field.

Closes to #4521
2014-01-13 09:21:53 +01:00
David Pilato c386155a73 add MockPageCacheRecycler in test jar
MockPageCacheRecycler is missing in test jar which makes failing tests when using
test jar in plugins:

```
1> [2014-01-11 10:51:30,531][ERROR][test                     ] FAILURE  : testWikipediaRiver(org.elasticsearch.river.wikipedia.WikipediaRiverTest)
  1> REPRODUCE WITH  : mvn test -Dtests.seed=5DAFD4FBAE587363 -Dtests.class=org.elasticsearch.river.wikipedia.WikipediaRiverTest -Dtests.method=testWikipediaRiver -Dtests.prefix=tests -Dtests.network=true -Dfile.encoding=MacRoman -Duser.timezone=Europe/Paris -Des.logger.level=INFO -Des.node.local=true -Dtests.cluster_seed=134842C2D806FFC0
  1> Throwable:
  1> java.lang.NoClassDefFoundError: org/elasticsearch/cache/recycler/MockPageCacheRecycler
  1>     org.elasticsearch.test.cache.recycler.MockPageCacheRecyclerModule.configure(MockPageCacheRecyclerModule.java:30)
  1>     org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
```

Closes #4694.
2014-01-13 09:06:59 +01:00
Luca Cavanna 0e7f6b1b1a [REST tests] Improved DoSection behaviour
No error wa previously thrown when a catch section was specified and a the rest call returned no error
Also, moved the catch:request on top to avoid even sending requests in that case
2014-01-12 12:44:39 +01:00