Commit Graph

7382 Commits

Author SHA1 Message Date
Jun Ohtani ba415b8ad2 Does not support "script" in value_clunt aggregation. 2014-02-04 10:26:07 +01:00
Adrien Grand cc1ff560df Rename `geohashgrid` to `geohash_grid` in documentation.
It was renamed in fc6bc4c477.

Close #4997
2014-02-04 09:39:55 +01:00
Lars Francke 1bd9dc129b Fix confusing sentence
The original sentence didn't make much sense. I hope this is a bit better. Taken heavy inspiration from c63d8c4fb5
2014-02-03 17:20:40 +01:00
Lars Francke 7cbd0962b5 Improve Aggregations documentation
* Mostly minor things like typos and grammar stuff
* Some clarifications
* The note on the deprecation was ambiguous. I've removed the problematic part so that it now definitely says it's deprecated
2014-02-03 17:16:52 +01:00
Simon Willnauer bd8cb4eb1b Add [0.90.11] version as a constant 2014-02-03 16:27:02 +01:00
Shay Banon d36e345f1f fix docs to reflect removal of byte buffer memory 2014-02-03 09:54:30 -05:00
Shay Banon d591972c18 Remove the in memory buffer Lucene store/directory
closes #4994
2014-02-03 09:52:19 -05:00
Luca Cavanna 56d3e98fff [TEST] added ability to filter REST test sections to run
Added `tests.rest.section` parameter that allows to filter the test sections that get executed via regex (case insensitive)
2014-02-03 15:30:58 +01:00
Luca Cavanna 63f9281bbf [TEST] added missing put warmer body 2014-02-03 15:30:58 +01:00
Luca Cavanna c72e1de1c4 [TEST] fixed typo s/mising/missing 2014-02-03 15:30:58 +01:00
Simon Willnauer f0774eb5d1 Added dedicated test for MultiMatchQuery 2014-02-03 13:04:33 +01:00
markharwood 82c7c81653 Added tests for match/multimatch queries with invalid “type” JSON param 2014-02-03 11:51:31 +00:00
Luca Cavanna 88771fdf99 [TEST] Added ability to test apis that don't return json
The last response body gets now always stashed in the REST tests and can be retrieved via `$body`. This implies that not only expected values can be retrieved from the stashed values, but actual values as well.

Added support for regular expressions to `match` assertion, using `Pattern.COMMENTS` flag for better readability through new custom hamcrest matcher (adopted in do section as well). Functionality added through new feature called `regex` that needs to be mentioned in the skip sections whenever needed till all the runners support it.

Added also example tests for cat count api
2014-02-03 11:26:38 +01:00
markharwood 5f8dbeaa8e Added exception if passed an invalid type param
Closes #4964
2014-02-03 10:09:38 +00:00
Luca Cavanna 1ca565cf9f [TEST] Added check that yaml REST test suites always end with \n
Our yaml parser seems to be too tolerant in some cases, e.g. it properly parses yaml suites when they don't end with a line feed, whereas other clients tests break due to that. We should try to do the same to keep consistency across runners.
2014-02-03 10:05:35 +01:00
George P. Stathis 74dd33689e Parent / child queries should work with non-default similarities 2014-02-02 09:23:12 +01:00
Martijn van Groningen 244723d401 Added `fields` support to `geo_point` and `completion` field type.
Upgrading 0.90.x `multi_field` type that has a `geo_point` or `completion` field type as default field would otherwise fail.
Also it make sense to support these field types, because both support specifying the actual values as string.
2014-02-02 07:16:36 +01:00
Simon Willnauer 9cf8251a0d Add RamUsageEstimator#sizeOf(Object) to forbidden APIs
This method can be a performance trap since it traverse the
entire object tree that is referenced by the provided object.
See LUCENE-5373
2014-01-31 21:43:20 +01:00
Simon Willnauer 6e18a8945d Prevent usage of object based RamUsageEstimator in Completion090PostingsFormat 2014-01-31 21:16:38 +01:00
Simon Willnauer 3e3170278e Don't load CompetionTerms if lookupFactory is null
Closes #4970
Closes #4788
2014-01-31 21:16:38 +01:00
Igor Motov 90da268237 Remove support for boost in copy_to field
Currently, boosting on `copy_to` is misleading and does not work as originally specified in #4520. Instead of boosting just the terms from the origin field, it boosts the whole destination field.  If two fields copy_to a third field, one with a boost of 2 and another with a boost of 3, all the terms in the third field end up with a boost of 6.  This was not the intention.

  The alternative: to store the boost in a payload for every term, results in poor performance and inflexibility. Instead, users should either (1) query the common field AND the field that requires boosting, or (2) the multi_match query will soon be able to perform term-centric cross-field matching that will allow per-field boosting at query time (coming in 1.1).
2014-01-31 14:34:01 -05:00
Lee Hinman 5448477c54 Add explanations for all AllocationDeciders
Relates to #4380
Relates to #2483
2014-01-31 10:47:23 -07:00
Luca Cavanna d68d8fbf11 [TEST] clarified skip features usage 2014-01-31 18:03:24 +01:00
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
Martijn van Groningen f60f72f19b Added missing licence header 2014-01-31 10:19:32 +01:00
Martijn van Groningen 0d9197a1d3 The binary field shouldn't be stored by default, because it is already available in the _source. 2014-01-31 10:15:51 +01:00
Martijn van Groningen b9707b395d Added benchmark for scroll searches. 2014-01-31 10:12:32 +01:00
Shay Banon ae3e8beca4 filtered query parses _name incorrectly
fixes #4960
2014-01-30 21:32:52 +01:00
Simon Willnauer dddfe23bed Randomized number of shards / replicas & add mapping for numeric fields 2014-01-30 20:42:31 +01:00
Mark Conlin cd9be4364f Improve boolean handling in snapshot/restore request parsing
Fixes #4949
2014-01-30 13:16:53 -05:00
Martijn van Groningen 7e1eed9814 The forceful no cache behaviour for range filter with now date match expression should only be active if no rounding has been specified for `now` in the date range range expression (for example: `now/d`).
Also the automatic now detection in range filters is overrideable by the `_cache` option.

 Closes #4947
 Relates to #4846
2014-01-30 15:51:33 +01:00
David Pilato abf9a86678 Add version to plugins
Plugin developpers can now add a version number to their es-plugin.properties file:

```properties
plugin=org.elasticsearch.test.integration.nodesinfo.TestPlugin
version=0.0.7-SNAPSHOT
```

Also, for site plugins, it's recommended to add a `es-plugin.properties` file in root site directory with `description` and `version` properties:

```properties
description=This is a description for a dummy test site plugin.
version=0.0.7-BOND-SITE
```

When running Nodes Info API, you will get information on versions:

```sh
$ curl 'http://localhost:9200/_nodes?plugin=true&pretty'
```

```javascript
{
  "ok" : true,
  "cluster_name" : "test-cluster-MacBook-Air-de-David.local",
  "nodes" : {
    "RHMsToxiRcCXwHiS6mEaFw" : {
      "name" : "node2",
      "transport_address" : "inet[/192.168.0.15:9301]",
      "hostname" : "MacBook-Air-de-David.local",
      "version" : "0.90.0.Beta2-SNAPSHOT",
      "http_address" : "inet[/192.168.0.15:9201]",
      "plugins" : [ {
        "name" : "dummy",
        "version" : "0.0.7-BOND-SITE",
        "description" : "This is a description for a dummy test site plugin.",
        "url" : "/_plugin/dummy/",
        "site" : true,
        "jvm" : false
      } ]
    },
    "IKiUOo-LSCq1Km1GUhBwPg" : {
      "name" : "node3",
      "transport_address" : "inet[/192.168.0.15:9302]",
      "hostname" : "MacBook-Air-de-David.local",
      "version" : "0.90.0.Beta2-SNAPSHOT",
      "http_address" : "inet[/192.168.0.15:9202]",
      "plugins" : [ {
        "name" : "test-plugin",
        "version" : "0.0.7-SNAPSHOT",
        "description" : "test-plugin description",
        "site" : false,
        "jvm" : true
      } ]
    },
    "H64dcSF2R_GNWh6XRCYZJA" : {
      "name" : "node1",
      "transport_address" : "inet[/192.168.0.15:9300]",
      "hostname" : "MacBook-Air-de-David.local",
      "version" : "0.90.0.Beta2-SNAPSHOT",
      "http_address" : "inet[/192.168.0.15:9200]",
      "plugins" : [ ]
    },
    "mGEZcYl8Tye0Rm5AACBhPA" : {
      "name" : "node4",
      "transport_address" : "inet[/192.168.0.15:9303]",
      "hostname" : "MacBook-Air-de-David.local",
      "version" : "0.90.0.Beta2-SNAPSHOT",
      "http_address" : "inet[/192.168.0.15:9203]",
      "plugins" : [ {
        "name" : "test-plugin",
        "version" : "0.0.7-SNAPSHOT",
        "description" : "test-plugin description",
        "site" : false,
        "jvm" : true
      }, {
        "name" : "test-no-version-plugin",
        "version" : "NA",
        "description" : "test-no-version-plugin description",
        "site" : false,
        "jvm" : true
      }, {
        "name" : "dummy",
        "version" : "NA",
        "description" : "No description found for dummy.",
        "url" : "/_plugin/dummy/",
        "site" : true,
        "jvm" : false
      } ]
    }
  }
}
```

Relative to #2668.
Closes #2784.
2014-01-30 14:13:46 +01:00
Alexander Reelsen 2c67ba8f1a REST Get Field Mapping API: Fix NPE if field not existent
When fixing #4738, a small issue leaked into the implementation.
The equals check in the RestAction only applied when the master node
returned the rest request, otherwise the object equality would not hold
due to being transferred over the wire and being deserialized into
another object (from and an equality point of view) than the
FieldMappingMetaData.NULL object - this could result in serialization
exceptions as an empty length bytes reference is used in toXContent.
2014-01-30 12:02:52 +01:00
uboness 79d1633dd6 fixed a bug where when executing on a single shard and sorting terms agg based on sub metric agg, the order (asc/desc) is not respected
- fixed tests for terms order

Closes #4951
2014-01-30 06:54:25 +01:00
Lee Hinman 4c06c533e8 Fix javadocs for DeleteResponse.isFound() 2014-01-29 22:29:05 -07:00
uboness d3f2173ef9 fixed date_/histogram aggregation documentation - added documentation for the `min_doc_count` setting
Closes #4944
2014-01-29 20:55:26 +01:00
Igor Motov 2755eecf65 Add throttling to snaphost and restore operations
Closes #4855
2014-01-29 10:33:59 -05:00
David Pilato 0541456b34 scroll REST API should support source parameter
As stated in documentation, we should support `?source=` parameter in `/_search/scroll` REST operations.

This is how to reproduce it:

```sh
curl -XDELETE "http://localhost:9200/test"
curl -XPOST "http://localhost:9200/test/type/1" -d'
{
    "foo": "bar"
}'

# This one works
curl -XPOST "http://localhost:9200/_search/scroll" -d "FAKESCROLLID"

# This one gives: {"error":"Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0"}
curl -XGET "http://localhost:9200/_search/scroll/?source=FAKESCROLLID"
```

Closes #4941.
2014-01-29 14:43:36 +01:00
Clinton Gormley c900ec2152 [TEST] Fixed whitespace in cluster.state/20_filtering.yaml 2014-01-29 13:33:29 +01:00
Igor Motov 2b80c752df Remove waiting for green in CopyToMapperIntegrationTests 2014-01-29 07:29:35 -05:00
Martijn van Groningen c82f27577b Added dedicated thread pool cat api, that can show all thread pool related statistic (size, rejected, queue etc.) for all thread pools (get, search, index etc.)
By default active, rejected and queue thread statistics are included for the index, bulk and search thread pool.
Other thread statistics of other thread pools can be included via the `h` query string parameter.

Closes #4907
2014-01-29 13:25:06 +01:00
Igor Motov a0e381ad3a Improve test stability 2014-01-29 07:14:27 -05:00
uboness 9f04e5fe38 fixed nested example response in docs
Closes #4935
2014-01-29 13:09:12 +01:00
Martijn van Groningen 2de0e60342 Wait for green after indexing doc, so that the mapping update is always after the index operation on replica has completed. (replica shard may needed to catch up) 2014-01-29 12:10:17 +01:00
mrsolo aadcfa7b51 Updated URLs to include 1.x and 1.0 snapshots
This file is used by elasticsearch client jerkin projects
2014-01-28 10:59:50 -08:00
David Pilato d621ab9958 Fix potential NPE when no source and no body
In recent changes, we added missing support for `source` parameter in some REST APIs:

* #4892 : mget
* #4900 : mpercolate
* #4901 : msearch
* #4902 : mtermvectors
* #4903 : percolate

```java
        BytesReference content = null;
        if (request.hasContent()) {
            content = request.content();
        } else {
            String source = request.param("source");
            if (source != null) {
                content = new BytesArray(source);
            }
        }
```

It's definitely better to have:

```java
        BytesReference content = request.content();
        if (!request.hasContent()) {
            String source = request.param("source");
            if (source != null) {
                content = new BytesArray(source);
            }
        }
```

That said, it could be nice to have a single method to manage it for various REST actions.

Closes #4924.
2014-01-28 18:15:27 +01:00
uboness dd389d1cc5 Made all multi-bucket aggs return consistent response format
Closes #4926
2014-01-28 17:46:57 +01:00
Simon Willnauer f9d1552282 Use #ensureSearchable() in GeoHashGridTests 2014-01-28 15:11:49 +01:00
Simon Willnauer 25f0bba30c Use num of actual threads if busiestThreads is larger
We currently use the number of hot threads that we are
interested in as the value for iterating over the actual
hot threads which can lead to AIOOB is the actual number
of threads is less than the given number.

Closes #4927
2014-01-28 14:23:42 +01:00
uboness 2ba2fb193d fixed compilation error on jdk7 2014-01-28 14:12:51 +01:00