Commit Graph

493 Commits

Author SHA1 Message Date
Clinton Gormley 640085c45d Disable benchmark tests until nodes set to run with
-Des.node.bench=true
2014-04-22 21:16:46 +02:00
Clinton Gormley eccbd911de [SPEC] Added path without scroll_id to clear_scroll 2014-04-22 19:38:55 +02:00
Clinton Gormley e2b4fbd1b1 [SPEC] The scroll_id is no longer a required qs param
Can be passed in the body instead
2014-04-22 19:30:51 +02:00
Clinton Gormley 2423c8c57a [SPEC] Added missing list_benchmarks test 2014-04-22 19:27:37 +02:00
Clinton Gormley 5d7263b69e [SPEC] Renamed benchmark endpoints
benchmark.submit -> benchmark
benchmark.list   -> list_benchmarks
benchmark.abort  -> abort_benchmark

And fixed the related tests
2014-04-22 19:14:26 +02:00
Andrew Selden 1f7f72135a Bug fix for hung clients on cluster without benchmark nodes
This is a fix for a bug whereby a cluster that has no nodes started with
-Des.node.bench=true will cause clients to hang if they attempt to
submit a benchmark.

Also adds REST tests to validate fix

Closes #5754
2014-04-21 15:08:50 -07:00
Andrew Selden 7ef36d9d52 Separate benchmark API endpoints
Separates benchmark API endpoints into separate files according to API
funtionality. This makes it easier for our tests and clients.

Closes #5787
2014-04-14 17:36:43 -07:00
Martijn van Groningen 45a1b44759 Each search request should use a new InternalSearchResponse instance even in case when all shards return no hits.
The InternalSearchResponse may get modified afterwards, so a new instance required at all times.
2014-04-11 17:44:21 +07:00
Martijn van Groningen 01794bf8ea Ignored clear scroll rest test 2014-04-11 13:47:41 +07:00
Martijn van Groningen b400129597 The clear scroll apis now optionally accepts a scroll_id in it body.
Closes #5726
2014-04-11 10:39:59 +07:00
Simon Willnauer bceac036af Fix _bench endpoint specs to have the body on the right level in the json object 2014-04-09 23:16:52 +02:00
Andrew Selden e2c8ff92ba Benchmark API
Add an API endpoint at /_bench for submitting, listing, and aborting
search benchmarks. This API can be used for timing search requests,
subject to various user-defined settings.

Benchmark results provide summary and detailed statistics on such
values as min, max, and mean time. Values are reported per-node so that
it is easy to spot outliers. Slow requests are also reported.

Long running benchmarks can be viewed with a GET request, or aborted
with a POST request.

Benchmark results are optionally stored in an index for subsequent
analysis.

Closes #5407
2014-04-09 13:06:55 -07:00
Simon Willnauer a9c8624c67 [TEST] MLT Rest test needs a mapping since we randomized number of nodes/shards 2014-04-09 11:45:55 +02:00
Simon Willnauer b4c506b952 [TEST] use no replicas in MLT tests - doc mappers need to be present on all nodes 2014-04-08 10:07:53 +02:00
javanna f283a9f3a5 [TEST] specified number_of_shards 5 to make sure the two docs end up in different shards that can be refreshed separately 2014-04-07 19:01:19 +02:00
javanna 1ec4f8f04b [TEST] Replaced RestTestSuiteRunner with parametrized test that uses RandomizedRunner directly
ElasticsearchRestTests extends now ElasticsearchIntegrationTest and makes use of our ordinary test infrastructure, in particular all randomized aspects now come for free instead of having to maintain a separate (custom) tests runner

We previously parsed only the tests that needed to be run given the version of the cluster the tests are running against. This doesn't happen anymore as it didn't buy much and it would be harder to support as the tests get now parsed before the test cluster gets started. Thus all the tests are now parsed regardless of their skip sections, afterwards the ones that don't need to be run will be skipped through assume directives.

Fixed REST tests that rely on a specific number of shards as this change introduces also random number of shards and replicas (through randomIndexTemplate)

Closes #5654
2014-04-07 17:08:05 +02:00
Alexander Reelsen f0ae43bbea Made template endpoint compatible with search endpoint
Before this the from/size parameters did not work.
Also updated the rest api spec definition file with all the query_string
parameters.

Fixes #5550
2014-04-03 00:01:30 +02:00
Alexander Reelsen e547e113e1 Geo context suggester: Require precision in mapping
The default precision was way too exact and could lead people to
think that geo context suggestions are not working. This patch now
requires you to set the precision in the mapping, as elasticsearch itself
can never tell exactly, what the required precision for the users
suggestions are.

Closes #5621
2014-04-02 23:51:14 +02:00
Alexander Reelsen 0ff30ade69 ContextSuggester: Adding couple of tests to catch more bugs
A bunch of minor fixes have been included here, especially due
to wrongly parsed mappings. Also using assertions resulted in an
NPE because they were disabled in the distribution.

Closes #5525
2014-03-31 16:16:21 +02:00
Clinton Gormley a809bfbcb2 [TEST] Fixed TTL tests for create, index, update
Were failing on faster boxes
2014-03-31 15:13:14 +02:00
javanna 84770c7d33 [TEST] decreased number of replicas to 0 in refresh tests
Some tests disable refresh and verify that documents cannot be found without an explicit refresh. With at least one replica and waiting for yellow though, it can happen that we start indexing docs when the replicas are not ready yet, and as soon as they become ready they get refreshed, causing the newly added docs to be unexpectedly found. Solution is to disable replicas for these specific tests.
2014-03-31 11:28:34 +02:00
Clinton Gormley 73547648ef [TEST] Update TTL test can fail on faster boxes - improve range of valid vals 2014-03-28 17:23:17 +01:00
javanna 34e9f8e83b [TEST] Removed skip regex sections as all the runners implemented the feature 2014-03-28 12:19:46 +01:00
Kevin Wang ceed22fe00 Add suggest stats
closes #4032
2014-03-28 11:13:54 +01:00
Igor Motov 3ffd0a1dfa Remove deprecated gateways
Closes #5422
2014-03-26 18:10:51 -04:00
Simon Willnauer 09e5ac98fa [TEST] Don't use replicas if only primaries are expected or the first shard in the list shoudl be a primary 2014-03-22 18:36:34 +01:00
Clinton Gormley ec8f404ac7 Renamed spec search.template.json to search_template.json
to match the name of the method.
2014-03-21 13:42:52 +01:00
javanna 70c9d6f3bd [TEST] added missing wait for yellow to indices recovery REST test 2014-03-21 10:24:07 +01:00
Honza Král ed842a88da [API] renaming search-template to search_template.
Name of the API should be a valid identifier.
2014-03-20 21:58:08 +01:00
Simon Willnauer bea0dd7c75 [TEST] Fix cat.recovery/10_basic.yaml to allow '-' in the hostname 2014-03-20 20:58:58 +01:00
Simon Willnauer 30532410bf [TEST] disable cat.recovery/10_basic.yaml 2014-03-20 20:43:17 +01:00
Simon Willnauer 6b5001891f [TEST] Added skip clause for regexp feature 2014-03-20 20:41:20 +01:00
Simon Willnauer 9cd3e850af Add simple escape method for special characters to template query
The default mustache engine was using HTML escaping which breaks queries
if used with JSON etc. This commit adds escaping for:

```
\b  Backspace (ascii code 08)
\f  Form feed (ascii code 0C)
\n  New line
\r  Carriage return
\t  Tab
\v  Vertical tab
\"  Double quote
\\  Backslash
```

Closes #5473
2014-03-20 18:48:14 +01:00
Andrew Selden 89e45fde9c Recovery API
Adds a new API endpoint at /_recovery as well as to the Java API. The
recovery API allows one to see the recovery status of all shards in the
cluster. It will report on percent complete, recovery type, and which
files are copied.

Closes #4637
2014-03-20 10:13:30 -07:00
Alexander Reelsen 8f6e1d4720 Query Templates: Adding dedicated /_search/template endpoint
In order to simplify query template execution an own endpoint has been added

Closes #5353
2014-03-20 17:43:40 +01:00
Clinton Gormley 96655d2505 PUT /_aliases should accept a numeric routing value
Also added REST tests for setting index/search/routing
via the PUT /_aliases endpoint

Fixes #5465
2014-03-20 10:38:32 +01:00
Igor Motov a1192044f2 Add ability to get snapshot status for running snapshots
Closes #4946
2014-03-17 20:13:49 -04:00
David Pilato f54e9246c1 Add _cat/plugins endpoint
If we want to have a full picture of versions running in a cluster, we need to add a `_cat/plugins` endpoint.

Response could look like:

```sh
% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
```

Closes #4824.
2014-03-16 12:16:09 +01:00
Adrien Grand 65d3b61b97 Add an option to force _optimize operations.
When forced, the index will be merged even if it contains a single segment with
no deletions.

Close #5243
2014-03-14 18:21:56 +01:00
Andrew Selden 673c282abd REST Testing framework enhancement
Adding operators 'lte' and 'gte' to our REST test framework. These
operators test for, respectively, less-than-or-equal and
greater-than-or-equal.
2014-03-10 15:08:43 -07:00
Boaz Leskes b7a95d11a7 Introduced VersionType.FORCE & VersionType.EXTERNAL_GTE
Also added "external_gt" as an alias name for VersionType.EXTERNAL , accessible for the rest layer.

Closes #4213 , Closes #2946
2014-03-10 21:07:17 +01:00
Clinton Gormley f4c0c3dae6 [TESTS] Fixed YAML in put_templates test 2014-03-06 12:16:01 +01:00
James Brook a93d6d55a5 Added support for aliases to index templates
Adapted existing PR (#2739) to updated code (post #4920), added tests and docs (@javanna)

Closes #1825
2014-03-06 11:11:07 +01:00
javanna 7d3cd89207 [TEST] added support for replacing stashed values within objects and lists in our REST tests 2014-03-03 13:34:22 +01:00
Lee Hinman f1f3aa3ac7 [TEST] skip explain reroute REST test until param substitution is implemented 2014-02-28 10:39:07 -07:00
Zachary Tong 0b6c404c51 [TEST] Dynamically extract node ID for test 2014-02-28 08:41:01 -05:00
Zachary Tong 4fe69528d2 [TEST] Add version and master_node parameter to _cluster/state 2014-02-28 08:27:17 -05:00
Lee Hinman e53a43800e Add `explain` flag support to the reroute API
By specifying the `explain` flag, an explanation for the reason a
command can or cannot be executed is returned. No allocation commands
are actually performed.

Returns a response similar to:

{
  "state": {...cluster state...},
  "acknowledged": true,
  "explanations" : [ {
    "command" : "cancel",
      "parameters" : {
        "index" : "decide",
        "shard" : 0,
        "node" : "IvpoKRdtRiGrQ_WKtt4_4w",
        "allow_primary" : false
      },
      "decisions" : [ {
        "decider" : "cancel_allocation_command",
        "decision" : "YES",
        "explanation" : "..."
        } ]
     }, {
      "command" : "move",
      "parameters" : {
        "index" : "decide",
        "shard" : 0,
        "from_node" : "IvpoKRdtRiGrQ_WKtt4_4w",
        "to_node" : "IvpoKRdtRiGrQ_WKtt4_4w"
       },
       "decisions" : [ {
         "decider" : "same_shard",
         "decision" : "NO",
         "explanation" : "shard cannot be allocated on same node [IvpoKRdtRiGrQ_WKtt4_4w] it already exists on"
       },
       etc
       ]
  }]
}

also removes AllocationExplanation from cluster state

Closes #2483
Closes #5169
2014-02-27 09:48:51 -07:00
javanna c2bb3981ba [TEST] removed REST test that checks for delete by query shard failures
The clients return an exception in case of failure and not the whole json response containing failures, thus this tests can only work with the Java REST tests runner
2014-02-26 14:11:40 +01:00
javanna e967400522 Expose delete by query shard failures follow-up
- Removed if conditions on index name and shard_id
- Added REST test
2014-02-26 13:14:52 +01:00