Commit Graph

563 Commits

Author SHA1 Message Date
Luca Cavanna 33d5a722b3 [TEST] Added ability to skip REST test suite/sections based on their required features
As we have different runners for the REST tests we need a mechanism that allows us to add features to any of them without breaking all others builds.
The idea is to name a feature and temporarily use skip sections that mention the required new features, so that runners that don't support it will skip the test.

Added support for `features` field in skip section.
Added `Features` class that contains a static list of the features supported by the runner. If a feature mentioned in a skip section is not listed here, the test will be skipped.
2014-01-31 16:47:40 +01:00
Clinton Gormley c900ec2152 [TEST] Fixed whitespace in cluster.state/20_filtering.yaml 2014-01-29 13:33:29 +01:00
Alexander Reelsen 5e58f4066e REST API: Consistent get field mapping response
If a get field mapping request is issued, and all but the field can be
found, the response should return an empty JSON object instead of a 404.

Closes #4738
2014-01-28 08:12:53 +01:00
Martijn van Groningen f38296da61 Percolator response now always returns the `matches` key.
Closes #4881
2014-01-27 16:37:09 +01:00
Luca Cavanna da1e3ed8fc [TEST] Added REST tests for create index api 2014-01-27 14:50:04 +01:00
Alexander Reelsen 24abb6cf3f Cluster state toXContent serialization only returns needed data
In order to make sure, that only the requested data is returned to the client,
a couple of fixes have been applied in the ClusterState.toXContent() method.
Also some tests were added to the yaml test suite

Closes #4885
2014-01-27 12:04:57 +01:00
David Pilato 09575eb95f Revert mget yaml test changes
Relative to #4892
2014-01-27 11:28:32 +01:00
David Pilato fdbdb705b9 Revert mget yaml test changes
Relative to #4892
2014-01-27 11:25:39 +01:00
David Pilato 4c50770a89 mget REST API should support source parameter
As stated in documentation, we should support `?source=` parameter in mget REST operations.

This is how to reproduce it:

```sh
curl -XDELETE "http://localhost:9200/test"

curl -XPOST "http://localhost:9200/test/type/1?refresh" -d'{
    "foo": "bar"
}'

curl -XPOST "http://localhost:9200/test/type/_mget" -d'{
    "ids": ["1"]
}'

curl -XGET "http://localhost:9200/test/type/_mget?source=%7B%22ids%22%3A%20%5B%221%22%5D%7D"
```

Closes #4892.
2014-01-27 11:05:50 +01:00
Clinton Gormley d70e6c4730 [SPEC] Updated docs URLs to point to master 2014-01-22 14:40:31 +01:00
Clinton Gormley 882fbb72fd [SPEC] Specify bulk format for body in bulk, msearch, mpercolate 2014-01-21 16:31:51 +01:00
Clinton Gormley 5800209a1e [TEST] Added newline at end of percolate tests 2014-01-21 16:31:50 +01:00
Clinton Gormley acdf2a5825 [SPEC] Renamed termvectors.* to termvector and mtermvectors
and fixed the YAML syntax errors
2014-01-21 16:31:50 +01:00
Britta Weber cae5eb479a [SPEC,TEST,FIX] add spec and tests for termvector api and fix inconsistencies
- index and type were not read from the uri with the _mtermvectors api
- ids were not read from the uri parameters with the _mtermvectors api
2014-01-21 10:03:25 +01:00
Igor Motov 749e4d7944 [SPEC] Fix cardinality of the repository parameter in get snapshot action 2014-01-20 12:56:32 -05:00
Martijn van Groningen efebb8d515 [TESTS] Added percolator rest tests. 2014-01-20 18:18:27 +01:00
Martijn van Groningen 9bc3d996ff [SPECS] Updated percolator specs. 2014-01-20 18:18:27 +01:00
Spencer Alger 8c7bbbcc8f Added setup task that clears the test template before running exists_* tests 2014-01-20 09:52:25 -07:00
Clinton Gormley 7129b9e6e6 [TEST] Added missing \n at end of YAML files, quoted * and fixed indentation 2014-01-20 13:25:16 +01:00
Clinton Gormley a313328777 [TEST] Added missing newline at end of YAML test file 2014-01-20 13:16:04 +01:00
Luca Cavanna 55a247e257 master_timeout parameter is now taken into account when calling cluster pending tasks api through the REST layer
Closes #4806
2014-01-20 12:53:55 +01:00
Luca Cavanna 3a558972b2 Added base Request class for read operations that usually happen on the master but can be executed locally.
Added base TransportAction class for master read operations that execute locally or not depending on the request class (local flag).

Added support for local flag where missing, in a backwards compatible manner:
     - IndicesExistsRequest
     - GetAliasesRequest (get alias api, aliases exist api)
     - TypesExistsRequest
     - GetIndexTemplatesRequest (get template, template exists)
     - GetSettingsRequest
     - GetRepositoriesRequest
     - PendingClusterTasks

 Added parsing of the local flag where missing in Rest*Action.

 Updated SPEC adding local flag param where missing and added REST tests that contain use of the local flag where it was just added.

Closes #3345
2014-01-20 12:35:48 +01:00
Clinton Gormley 67ec840d00 [SPEC] Various API fixes
Including:
* change some string params to list
* make some params or bodies required
* removed incorrect URLs
* removed incorrect params
* Fixed name of pending_tasks
2014-01-20 11:14:11 +01:00
Clinton Gormley 20b37416e3 [SPEC] Removed create.json
Create is a special API that is most simply and safely
implemented by calling the index() api with op_type
set to true.
2014-01-20 11:14:11 +01:00
Luca Cavanna 619c46a2a3 [SPEC] Removed empty paths from close and delete index apis
Although the empty paths are still registered in the java RestActions, that is only to return a meaningful error in case the index is not provided.
Index/indices are now mandatory.
2014-01-18 10:40:46 +01:00
Honza Král fe60cca038 [SPEC] path without {index} is not allowed for indices.open api 2014-01-17 22:54:07 +01:00
Luca Cavanna de893d80de [SPEC] Removed _source endpoint from get api spec, as the get_source is a different api already
Also removed custom code that was required in the REST tests due to this.
2014-01-17 18:05:07 +01:00
Honza Král 13e6f1933b [SPEC] removing deprecated include/exclude for get_source
_source_include/_source_exclude should be used instead
2014-01-17 15:38:25 +01:00
Luca Cavanna 1fba68a634 [SPEC] Added missing body object in snapshot apis 2014-01-17 15:34:42 +01:00
Clinton Gormley 53359c0d3d [SPEC] Created snapshot.* and nodes.* namespaces
Moved node_info, node_stats, shutdown and hot_threads into nodes.*
Moved snapshot and repository APIs into snapshot.*
2014-01-17 11:58:44 +01:00
Clinton Gormley 612044b386 [SPEC] Added missing cat endpoints. count and recovery
And added missing qs params to health and indices.
2014-01-16 22:09:48 +01:00
Luca Cavanna 06057c6c39 [TEST] Added check: test section names must be unique in the same REST test suite
Fixed also three duplicates found
2014-01-16 21:09:55 +01:00
Clinton Gormley 258c49ea23 [SPEC] Fixed bad name in ping.json 2014-01-16 19:54:25 +01:00
Clinton Gormley 1ca11b11e4 [SPEC] Fixed cluster.get_repository spec
Badly named endpoint
2014-01-16 19:43:58 +01:00
Clinton Gormley fa6e8abf48 [SPEC] Fixed cat.* spec files - were missing the endpoints 2014-01-16 19:43:58 +01:00
Clinton Gormley c5942a4ff8 [TEST] Fixed mget test which used deprecated refresh flag 2014-01-16 19:43:58 +01:00
Clinton Gormley 64f0361f5e [SPEC] Fixed file name, missing .json 2014-01-16 17:12:39 +01:00
Clinton Gormley e9b14ff636 [SPEC] Separated info.json into info and ping.json (GET vs HEAD) 2014-01-16 17:07:47 +01:00
Clinton Gormley 04b6dd9d0c [SPEC] Moved the cat API into its own namespace and added missing qs params 2014-01-16 17:06:03 +01:00
Clinton Gormley 84e2e1c177 [SPEC] Renamed snapshot/restore apis 2014-01-16 16:32:39 +01:00
Clinton Gormley 23a1fd795b [SPEC] Fixed bad JSON in indices.open 2014-01-16 15:33:09 +01:00
Clinton Gormley b7d4b30ad7 [SPEC] Added indices.exists_template.json 2014-01-16 15:29:50 +01:00
Clinton Gormley 5856378866 [SPEC] Added local to indices.get_mapping and indices.get_field_mapping 2014-01-16 15:29:50 +01:00
Clinton Gormley 555dbfd4b3 [SPEC] Added force to indices.refresh 2014-01-16 15:29:50 +01:00
Clinton Gormley ec3b19a866 [SPEC] Removed refresh from indices.flush and indices.optimize 2014-01-16 15:29:50 +01:00
Clinton Gormley c3813ceb71 [SPEC] Added empty path to indices.open and indices.close 2014-01-16 15:29:50 +01:00
Clinton Gormley d24994e4b4 [SPEC] Removed percolate from update 2014-01-16 15:29:50 +01:00
Clinton Gormley 056609b46c [SPEC] Added timeout, master_timeout to cluster.get_settings and cluster.reroute 2014-01-16 15:29:50 +01:00
Clinton Gormley e86bfdae46 [SPEC] Removed percolate from index.json 2014-01-16 15:29:49 +01:00
Clinton Gormley 93cd53b8cf [SPEC] Added _source, _source_include, _source_exclude to get_source 2014-01-16 15:29:49 +01:00
Clinton Gormley 8d3eba3035 [SPEC] Added version, version_type to get and get_source 2014-01-16 15:29:49 +01:00
Clinton Gormley c66c9ff379 [SPEC] Added cluster.pending_tasks.json 2014-01-16 15:29:49 +01:00
Clinton Gormley 3bbab4c106 [SPEC] Added cluster.stats.json 2014-01-16 15:29:49 +01:00
Clinton Gormley 00ed78f3d6 [SPEC] Added cluster.repositories.* and cluster.snapshots.* 2014-01-16 15:29:49 +01:00
Clinton Gormley 500d6f7098 [SPEC] Added cat.json 2014-01-16 15:29:49 +01:00
Clinton Gormley e613ecf9b4 [SPEC] Added the routing and timeout params to bulk 2014-01-16 15:29:49 +01:00
Clinton Gormley c4713b1022 [SPEC] Added human flag to:
* cluster.node_info
* cluster.node_stats
* indices.segments
* indices.stats
* indices.status
2014-01-16 12:42:02 +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
Britta Weber 2f115b8103 update rest spec to be consistent with recent changes
see issue #4071
2014-01-15 00:56:52 +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
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
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
Simon Willnauer f2f4b72a12 Add missing closing '}' to indices.stats.json 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
Clinton Gormley 0916372520 Fix YAML in test/indices.open/20_multiple_indices.yaml 2014-01-13 13:17:30 +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
Spencer Alger 71d77d17e1 Updated the documentation urls in the rest api spec. 2014-01-09 14:44:14 -07:00
Martijn van Groningen eb63bb259d Added `action.destructive_requires_name` that controls whether wildcard expressions and `_all` is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression)
Closes #4549 #4481
2014-01-09 11:36:50 +01:00
Britta Weber 216c814a7f remove default `_all` for `type` and `index` if these are missing in REST tests
If a type or path is missing in the REST test yaml file, it is
automatically replaced with _all. This makes it hard to test changes
in the api, for example adding the possibility to leave the index
blank in addition to _all and * in the uri.

closes #4657
2014-01-09 10:17:42 +01:00
Martijn van Groningen 0973b2863c Added extra rest endpoint for get settings api.
Added rest test to also test the get settings' prefix option.
2014-01-09 09:44:40 +01:00
Luca Cavanna cb3b653a55 [SPEC] added nmissing comma in cluster.node_stats api spec 2014-01-08 21:24:23 +01:00
Honza Král 6e4586fd6b [SPEC] Clarify cluster.node_stats api 2014-01-08 21:03:06 +01:00
Honza Král fe1344107c [SPEC] refactor cluster.node_info json spec to reflect clients' apis 2014-01-08 20:19:29 +01:00
Igor Motov bec6527312 Add support for flat_settings flag to all REST APIs that output settings
Closes #4140
2014-01-08 10:36:36 -05:00
Luca Cavanna 6c23ace68f Fixed open/close index api when using wildcard only
Named wildcards were not always properly replaced with proper values by PathTrie.
Delete index (curl -XDELETE localhost:9200/*) worked anyway as the named wildcard is the last path element (and even if {index} didn't get replaced with '*', the empty string would have mapped to all indices anyway). When the named wildcard wasn't the last path element (e.g. curl -XPOST localhost:29200/*/_close), the variable didn't get replaced with the current '*' value, but with the empty string, which leads to an error as empty index is not allowed by open/close index.

Closes #4564
2014-01-08 15:01:49 +01:00
Martijn van Groningen 6dc434822c Changed get index settings api to use new internal get index settings api instead of relying on the cluster state api.
The new internal get index settings api is more efficient when it comes to sending the index settings from the master to the client via the
Also the get index settings support now all the indices options.

Closes #4620
2014-01-08 13:18:57 +01:00
Alexander Reelsen ad50afbec8 Simplify usage of nodes info API
Important: This breaks backwards compatibility with 0.90

* Removed endpoints: /_cluster/nodes, /_cluster/nodes/nodeId1,nodeId2
* Disallow usage of parameters, but make required metrics part of URI
* Changed NodesInfoRequest to return everything by default
* Fixed NPE in NodesInfoResponse

Closes #4055
2014-01-08 09:46:04 +01:00
Lee Hinman 2cb40fcb17 Rename "exists" to "found" in TermVector and Get responses
- Adds the "created" field to the index action response
- Reverses Delete class' notFound to Found to avoid double negative
2014-01-07 09:47:07 -07:00
Lee Hinman d23f640cd1 Remove hard-coded "ok": true from REST responses 2014-01-07 09:27:07 -07:00
Honza Král 623e4a0fc8 [TEST] remove old tests from yaml test suite 2014-01-07 16:19:06 +01:00
Honza Král 4aeaa3bac4 [TEST] Fix yaml tests after #4542 2014-01-07 16:06:25 +01:00
Simon Willnauer 3240cc8145 Clarify options for flush request 2014-01-06 17:44:56 +01:00
Honza Král aacb51bae7 [SPEC] Bringing back the specs for _aliases 2014-01-06 17:25:15 +01:00
Martijn van Groningen 3024cc24a6 Added missing indices options to rest spec and rest actions. 2014-01-05 23:32:44 +01:00
Honza Král 8517d8954e [TEST] add name parameter to get_alias in update_alias tests
to avoid failure on older es versions since get_alias without name has been
only introduced in #4539
2014-01-02 20:04:24 +01:00
Honza Král 076a24af14 [TEST] split tests with parent to pre/post 1.0 in the yaml test suite
See #4506 for details
2014-01-02 20:04:24 +01:00
Honza Král d5efb54785 [TEST] Split delete by query tests pre-1.0 and post-1.0
See #4074 for details
2014-01-02 20:04:24 +01:00
Martijn van Groningen aa548f5148 Remove GET `_aliases` api in favour for GET `_alias` api
Currently there are two get aliases apis that both have the same functionality, but have a different response structure. The reason for having 2 apis is historic.

The GET _alias api was added in 0.90.x and is more efficient since it only sends the needed alias data from the cluster state between the master node and the node that received the request. In the GET _aliases api the complete cluster state is send to the node that received the request and then the right information is filtered out and send back to the client.

The GET _aliases api should be removed in favour for the alias api

Closes to #4539
2014-01-02 13:56:11 +01:00
Martijn van Groningen f4bf0d5112 Replaced `ignore_indices` with `ignore_unavailable`, `expand_wildcards` and `allow_no_indices`.
* `ignore_unavailable` - Controls whether to ignore if any specified indices are unavailable, this includes indices that don't exist or closed indices. Either `true` or `false` can be specified.
* `allow_no_indices` - Controls whether to fail if a wildcard indices expressions results into no concrete indices. Either `true` or `false` can be specified. For example if the wildcard expression `foo*` is specified and no indices are available that start with `foo` then depending on this setting the request will fail. This setting is also applicable when `_all`, `*` or no index has been specified.
* `expand_wildcards` - Controls to what kind of concrete indices wildcard indices expression expand to. If `open` is specified then the wildcard expression if expanded to only open indices and if `closed` is specified then the wildcard expression if expanded only to closed indices. Also both values (`open,closed`) can be specified to expand to all indices.

Closes to #4436
2014-01-02 12:19:45 +01:00
Martijn van Groningen a7bb28c0e7 Made single shards APIs fail if routing is configured to be required in the mapping.
This change make single shard requests fail when no routing is specified and routing has been configured to be required in the mapping. Thi

 Closes #4506
2014-01-02 10:47:53 +01:00
Martijn van Groningen bb01995722 Made APIs consistently accept a query in the request body's `query` field.
The following APIs now accept the query in a top level `query` field like:
* delete_by_query
* validate_query
* count

These APIs used to accept the query directly in the request body which was inconsistent with the search and explain APIs. For this reason t

Closes #4074
2014-01-02 10:06:01 +01:00
Simon Willnauer fa4315005b Allow for version >= 0.90.10 2013-12-23 12:07:05 +01:00
Clinton Gormley b8aba737f4 [TEST] Added skip clause to analyze API with text format.
No longer supported in 1.0.0.RC1
2013-12-11 22:43:18 +00:00
Clinton Gormley 13d9d17155 Update README with full command to generate spec 2013-12-11 18:33:45 +00:00
Boaz Leskes ea4a908bdb Added field mapping API tests which use wild cards
See: https://github.com/elasticsearch/elasticsearch/issues/4367
2013-12-11 15:00:33 +01:00
Karel Minarik ccbb0e5c97 [UTIL] Fixed an error for the `--output` parameter in `thor api:spec:generate` 2013-12-05 17:36:54 +01:00
Honza Král 2d29bb7a63 [API] bulk request now supports timeout, see #4220 2013-11-25 11:53:32 +01:00
Clinton Gormley 381436843d [TEST] Fixed suggestion tests for 1.0.0.Beta1
Results order has changed because the standard analyzer no
longer removes stopwords
2013-11-07 14:26:22 +01:00
Clinton Gormley 602c3b6782 [TEST] Renamed _percolator to .percolator 2013-11-07 14:25:24 +01:00
Clinton Gormley c579164a88 [TEST] Fixed bad indentation on realtime_refresh tests 2013-11-05 13:28:47 +01:00
Karel Minarik e051c8a663 [TEST] Create the index with `number_of_replicas: 0` for "Realtime Refresh" tests 2013-11-05 11:24:31 +01:00
Karel Minarik afcc9d52ab [API] Changed `fields` parameter to required in "Get Field Mapping" API
Also reworded `include_defaults` description.
2013-11-05 11:17:59 +01:00
Karel Minarik da9da0c7a2 [TEST] Removed the `skip` in the common test "setup" definition
Until the issue with skipping tests en masse is resolved, let's use individual `skip` statements,
as supported in current YAML runners.
2013-11-05 10:05:34 +01:00
Karel Minarik e49683a5ee [TEST] Fixed incorrect `skip` behaviour in the "Get Field Mapping" API tests 2013-11-05 09:47:02 +01:00
Clinton Gormley 57894b70f4 [TEST] Test for get_field_mapping was calling get_mapping 2013-11-02 13:21:06 +01:00
spenceralger 5ef83b6c9a Updated "version_type" to match delete.json 2013-10-30 17:26:32 -07:00
spenceralger d85e264d03 Fixed method name, and the doc url 2013-10-30 14:16:55 -07:00
Boaz Leskes ebdde4ea46 Added spec + tests for the GetFieldMapping API
Introduced in https://github.com/elasticsearch/elasticsearch/issues/3941
2013-10-30 19:19:35 +01:00
Clinton Gormley cf795cfe4c [TEST] Corrected YAML syntax in mget/70_source_filtering
and broke it up into multiple tests which are easier to debug
2013-10-26 13:09:37 +02:00
Zachary Tong e5daab0b6b Remove unescessary newline continuation
Newline continuation causes some yaml parsers to interpret the
hash as a string instead of a proper hash
2013-10-25 14:14:12 -04:00
spenceralger 1cfe0f32c6 Added URL to indices.get_template to match previous change
Since the name is no longer required, added a supporting path to the paths array.
2013-10-23 21:14:02 -07:00
Boaz Leskes d202d3386a Added brackets to a do command. 2013-10-11 12:29:44 +02:00
Boaz Leskes 4a91a243b1 Normalizing the source filtering params of get_source with the rest of the API 2013-10-11 12:29:17 +02:00
Zachary Tong 6e2deaa4b7 Get all templates not available before 0.90.3 2013-10-09 13:11:00 +02:00
Boaz Leskes 87df522786 updated source filtering tests and spec
Fixed id tests to be strings.
Changed the _source_* param of get_source as they have changed in core.
2013-10-08 18:18:20 +02:00
Boaz Leskes a04bce96c7 The name parameter of indices.get_template is not required. 2013-10-08 18:16:27 +02:00
Clinton Gormley e791f463b1 [API] cluster.health wait_for_nodes is a string, not a number 2013-10-01 19:28:46 +02:00
spenceralger a6c9150427 Reverse course
See comment [here](2dd7f4f652 (commitcomment-4189612))
2013-09-26 09:52:23 -07:00
spenceralger e7465fee87 Added path to exist, supporting optional "type" part
Since the type is an optional part, there needs to be a path that can be used without it.
2013-09-25 20:03:28 -07:00
Clinton Gormley a958d5a63d [TEST] In the open indices test, wait for yellow after opening 2013-09-25 19:29:16 +02:00
Clinton Gormley 7d6869e149 [TEST] single alias APIs not supported before 0.90.1 2013-09-25 18:59:12 +02:00
Clinton Gormley 8e9a71341e [TEST] get_source not supported before 0.90.1 2013-09-25 18:59:12 +02:00
Honza Kral 559d284f41 [API] formatting issues 2013-09-25 14:08:18 +02:00
Clinton Gormley e283e0dc38 [TEST] Fixed the delete_template test so that it works for 0.90.* 2013-09-25 13:54:08 +02:00
Clinton Gormley 766d6e60ea [TEST] The get_mapping change in format is in master, not 0.90.* 2013-09-25 13:39:58 +02:00
Clinton Gormley 8a4d668227 Percolation results have changed in master 2013-09-23 13:53:45 +02:00
Clinton Gormley be8fad31cf The get_mapping tests were the wrong way around 2013-09-23 13:53:32 +02:00
Clinton Gormley a78781cdc6 [API] Added _source,_source_include,_source_exclude to
* explain
* get
* mget
* search
* get_source
2013-09-23 13:23:25 +02:00
Clinton Gormley 653ae20603 Added the clear_scroll spec 2013-09-20 22:21:26 +02:00
Clinton Gormley e0adae6497 completion_fields and field_data fields not support in node stats yet.
See https://github.com/elasticsearch/elasticsearch/issues/3746
2013-09-20 14:15:08 +02:00
Clinton Gormley 36b489cbc2 Added completion stats to cluster.node_stats and indices.stats 2013-09-20 13:26:04 +02:00
Spencer Alger 13719a4c2e removed some spaces that cause my yaml parser to choke 2013-09-18 08:54:17 -07:00
Clinton Gormley 5a31353fb0 Updated the test README to allow multiple test sections and an initial setup section 2013-09-18 15:54:58 +02:00
Clinton Gormley e957aa3364 Changed the get_mapping test to handle versions correctly 2013-09-18 15:29:40 +02:00
Clinton Gormley 1eed74c9be Moved get-missing template tests into their own file 2013-09-18 15:29:21 +02:00
Clinton Gormley 853b661789 Removed the regression tests for aliases - missing index etc
should be caught by the client before it hits ES
2013-09-18 15:28:51 +02:00
Clinton Gormley 0ff03b5652 Fixed the skip range on percolator tests 2013-09-17 14:28:26 +02:00
Clinton Gormley f3e69a150d Fixed put_template test to work with 0.90.3 onwards, where
a missing template now throws a 404
2013-09-17 14:28:14 +02:00
Clinton Gormley 59ca459b1c Fixed indices.open test - need to wait for shards to be allocated
before trying to close the index
2013-09-17 14:16:18 +02:00
Clinton Gormley 1279a29ee3 Explain returns a 1, not 1.0 2013-09-16 20:56:59 +02:00
Clinton Gormley e0e4b6b4dc Rename weird-index to start with test- so that it gets cleaned up 2013-09-16 20:56:48 +02:00
Clinton Gormley de4a84ccee Scroll test was missing an index - fails when other indices present 2013-09-16 20:56:32 +02:00
Clinton Gormley 3011201a51 Fixed indentation on an analyzer test 2013-09-16 20:56:12 +02:00
Karel Minarik 81ffa94937 Added an example of test `setup` into the `indices.analyze` API 2013-09-12 10:27:46 +02:00
Karel Minarik 397235e2f2 Changed the `ignore_missing` client parameter to `ignore: 404`
This should make easier any potential expansion such as:

    client.update('index', 'type', 41, {...}, ignore: 409

Also restructured and renamed the test suite a bit as part of the commit.

---

This reverts commit 0b142cc8812d8d090e48ea0ad89c007767870b91, "Removed client-specific `ignore_missing` parameter".
2013-09-09 23:36:45 +02:00
Karel Minarik 6cfbd2f7c4 Removed the incorrect info about `_all` default for index in `indices.get_mapping` API 2013-09-09 23:36:45 +02:00
Karel Minarik cb4b04e49f Added tests for default document type in `get` and `get_source` APIs 2013-09-09 23:36:45 +02:00
Karel Minarik e784cff1b0 Revert "Changed the missing `type` to `_all` in "Get Source" test"
This reverts commit f834a8b9a18739ba97eba592be98ce6804082d37.
2013-09-09 23:36:45 +02:00
Karel Minarik bd9befbc80 Revert "Changed the missing `type` to `_all` in "Get" test"
This reverts commit c7b376a4222d68788c59ffefbaaeae33d70536b8.
2013-09-09 23:36:45 +02:00
Karel Minarik d0a282727f Renamed the "All indices" test for `_search` API to "Default index"
This reverts commit 51713399e943412866e95cf94f341cb4625ef831.
2013-09-09 23:36:44 +02:00
Karel Minarik 62a489b07b Added test for client-side default document type in `exists` API
This reverts commit f6f037e6b15b51023c6ca45adbd394fd16e714f1.
2013-09-09 23:36:44 +02:00
Karel Minarik 4e0396768b Improved and fixed "Get Mapping" tests
* Fixed error in `skip` explanation for "get type" test
* Separated the tests for getting index/type mapping

I vote for removing the "get type" test entirely, since it just tests ancient versions.
2013-09-09 23:36:44 +02:00
Karel Minarik 690151516d Fixed incorrect test names in "Update" fields / meta-fields tests 2013-09-09 23:36:44 +02:00
Karel Minarik ad3bf79c6a Changed the "Indices Analyze" test to better correspond with the new test structure
1. Move the "text format" test into separate file
2. Remove the "JSON format" from test names
2013-09-09 23:36:44 +02:00
Karel Minarik 1300982e22 Removed test "setup" in "Indices Analyze" test
When the runner contract is specified as "run all the tests in the file in sequence,
resetting cluster after each file", it makes is hard to translate the concept into
regular Test::Unit environment.

Changed the "Analyze API JSON format - index and field" test to perform the necessary
setup as part of the test code.
2013-09-09 23:36:44 +02:00
Karel Minarik 46059673ef Changed the missing `type` to `_all` in "Get" test 2013-09-09 23:36:44 +02:00
Karel Minarik 7933dbe205 Corrected test names for "Bulk" test suite 2013-09-09 23:36:43 +02:00
Karel Minarik e1bfc0aa27 Changed the missing `type` to `_all` in "Get Source" test 2013-09-09 23:36:43 +02:00
Karel Minarik a4228bf2bc Changed the "default index/type" to use `index: _all` and renamed to "All indices" 2013-09-09 23:36:43 +02:00
Karel Minarik 0949195f90 Removed test for client-side default type in `exists` API 2013-09-09 23:36:43 +02:00
Karel Minarik 081b3e3982 Removed client-specific `ignore_missing` parameter
This parameter can introduce confusion, since people might think this is something
working on Elasticsearch level, eg. passing it to `curl`
2013-09-09 23:36:43 +02:00
Karel Minarik 5b8df7eba6 Fixed incorrect default JSON spec for `get_source` API 2013-09-09 20:59:47 +02:00
Karel Minarik 6196efa553 Fixed a typo on the `get` API spec 2013-09-09 17:04:50 +02:00
Karel Minarik 746bdb12b3 Added the default `_all` value for document type in `get_source` API 2013-09-09 14:00:40 +02:00
Karel Minarik dc10b9b19a Added the default `_all` value for document type in `get` API 2013-09-09 13:36:31 +02:00
Karel Minarik 44c56b0888 Added the default index value to the `search` API spec 2013-09-09 13:33:46 +02:00
Karel Minarik 46c8bd186c Changed the JSON spec to include the default document API in the `exists` API 2013-09-09 11:56:09 +02:00
Boaz Leskes dbc0823a77 Added version skip commands for source filtering tests 2013-07-30 14:00:23 +02:00
Boaz Leskes 495667facb Added source filtering to tests 2013-07-30 13:30:45 +02:00
Zachary Tong b6d90d52bd Replace refresh with cluster.health check
Possible to fail this test with a 500 NoShardsAvailable error, due
to the index not being fully allocated before the analyze call is
executed.

Changing for a wait_for_status: yellow fixes the occasional problem.
2013-07-26 07:40:11 +02:00
Zachary Tong 4274e9df4f Change script language to something guaranteed to never exist 2013-07-26 07:40:06 +02:00
Honza Kral f4cce2c634 cluster.node_info 2013-07-24 17:13:03 +02:00
Honza Kral ee1db9781f cluster state 2013-07-24 17:08:54 +02:00
Honza Kral 35deed9bc3 indices.clear_cache 2013-07-24 16:51:55 +02:00
Honza Kral 1d1dc72e23 cluster.node_stats 2013-07-24 16:51:38 +02:00
Honza Kral 8490bf32b7 indices.snapshot_index 2013-07-24 16:05:38 +02:00
Honza Kral 76912f4a6f indices.segments 2013-07-24 16:05:21 +02:00
Honza Kral cf95ee9888 sanity check for stats 2013-07-24 15:59:08 +02:00
Honza Kral e925ea3b78 validate query 2013-07-24 04:12:03 +02:00
Honza Kral 12597309c6 Optimize tests 2013-07-24 03:57:58 +02:00
Honza Kral 938ffdfea4 indices.status 2013-07-24 03:51:57 +02:00
Honza Kral c447fe5002 open/close index tests 2013-07-24 03:47:52 +02:00
Honza Kral fb512495cb use flush instead of cluster health to avoid writing a separate test 2013-07-24 03:41:02 +02:00
Honza Kral 85616ca620 Basic explain tests 2013-07-24 01:54:12 +02:00
Honza Kral 738faec713 Super simple super useless mlt test 2013-07-24 01:47:28 +02:00
Honza Kral 2e06c35b98 Percolate tests 2013-07-24 01:39:20 +02:00
Honza Kral d24fa52099 Warmer APIs 2013-07-24 01:28:27 +02:00
Honza Kral f147872fd9 update_aliases basic tests 2013-07-24 01:17:51 +02:00
Honza Kral b1284d0301 ticket #3259 still isn't done 2013-07-23 20:42:20 +02:00
Honza Kral 2527f5a9fa Make put_mapping tests work for 0.90.2 and master 2013-07-23 20:26:58 +02:00
Honza Kral 3e01daf34f enable skip to be in the middle of a test 2013-07-23 20:24:46 +02:00
Honza Kral 434b70ba91 Siggest api broken in current release 2013-07-23 20:10:59 +02:00
Honza Kral 82de8c35e7 Delete ignores parent param 2013-07-23 20:10:48 +02:00
Honza Kral 875de1a5a6 suggest api tests 2013-07-23 19:26:22 +02:00