Commit Graph

7143 Commits

Author SHA1 Message Date
Shay Banon f1174eac3a upgrade to guava 16.0
also fixes #4830
2014-01-21 15:26:03 +01:00
Adrien Grand 50174d1790 SearchType randomization in integration tests.
Issue #4754 showed that using DFS_QUERY_THEN_FETCH instead of QUERY_THEN_FETCH
might expose interesting bugs.

Close #4793
2014-01-21 14:31:14 +01:00
Adrien Grand 728a5647c3 Allow to configure indices.fielddata.breaker.limit with a ratio of the heap size.
Close #4616
2014-01-21 13:55:58 +01:00
Luca Cavanna 8f96930638 Deprecated ToXContent.Params#paramAsBooleanOptional in favour of paramAsBoolean
Closes #4817
2014-01-21 11:05:11 +01:00
Martijn van Groningen 66ed9a855a [DOCS] Added multi fields link to mapping page. 2014-01-21 10:52:32 +01:00
Luca Cavanna 93d4582641 Deprecated use of partial fields in Java API, was already deprecated in the docs for the search API
Closes #4118
2014-01-21 10:35:52 +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
Martijn van Groningen f2fb114a3e Only refresh id_cache if the parent field is active. 2014-01-21 09:31:45 +01:00
Shay Banon e29659e36d add internal force local flag, used by tribe node
tribe node to set it to true so all master read operations will automatically execute on the local tribe node
2014-01-20 22:40:26 +01:00
Martijn van Groningen 78590a8b6b Removed redundant statements. 2014-01-20 22:32:36 +01:00
Luca Cavanna bdb1992e85 Fixed typo 2014-01-20 19:32:50 +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
Igor Motov 406762f775 Ignore empty config paths 2014-01-20 12:05:05 -05:00
David Pilato 48aaf34f4f River does not start when using config/templates files
From elasticsearch 0.90.6, when you have templates files defined in `config/templates` dir, rivers don't start anymore.

Steps to reproduce:

Create `config/templates/default.json`:

```javascript
{
  default:
  {
    "template" : "*",
    "mappings" : {
      "_default_" : {
      }
    }
  }
}
```

Start a dummy river:

```sh
curl -XPUT 'localhost:9200/_river/my_river/_meta' -d '{ "type" : "dummy" }'
```

It gives:

```
[2014-01-01 22:08:38,151][INFO ][cluster.metadata         ] [Forge] [_river] creating index, cause [auto(index api)], shards [1]/[1], mappings [_default_]
[2014-01-01 22:08:38,239][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:38,245][INFO ][cluster.metadata         ] [Forge] [_river] update_mapping [my_river] (dynamic)
[2014-01-01 22:08:38,250][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:39,244][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:39,252][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:40,246][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:40,254][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:41,246][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:41,255][INFO ][river.routing            ] [Forge] no river _meta document found, retrying in 1000 ms
[2014-01-01 22:08:42,249][WARN ][river.routing            ] [Forge] no river _meta document found after 5 attempts
[2014-01-01 22:08:42,257][WARN ][river.routing            ] [Forge] no river _meta document found after 5 attempts
```

With elasticsearch 0.90.2 or with no template file in `config/templates` dir, it gives:

```
[2014-01-01 22:22:32,096][INFO ][cluster.metadata         ] [Forge] [_river] creating index, cause [auto(index api)], shards [1]/[1], mappings []
[2014-01-01 22:22:32,221][INFO ][cluster.metadata         ] [Forge] [_river] update_mapping [my_river] (dynamic)
[2014-01-01 22:22:32,228][INFO ][river.dummy              ] [Forge] [dummy][my_river] create
[2014-01-01 22:22:32,228][INFO ][river.dummy              ] [Forge] [dummy][my_river] start
[2014-01-01 22:22:32,234][INFO ][cluster.metadata         ] [Forge] [_river] update_mapping [my_river] (dynamic)
```

Closes #4577.
Closes #4656.
2014-01-20 17:56:39 +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
Igor Motov 649f1b13da Initial implementation of custom _all field
Closes #4520
2014-01-20 10:44:33 -05:00
Adrien Grand af1513f908 Add page tracking to MockPageCacheRecycler.
This found an issue in BytesRefHash that forgot to release the start offsets.

Close #4814
2014-01-20 16:23:37 +01:00
Adrien Grand 3586157467 Make StringFieldMapper.toXContent aware of defaults for not_analyzed fields.
StringFieldMapper.toXContent uses the defaults for analyzed fields in order to
know which options to add to the builder. This means that if the field is not
analyzed and has norms enabled, it will omit to emit `norms.enabled: true`.
Parsing the mapping again will result in a StringFieldMapper that has norms
disabled.

The same fix applies to index options.

Close #4760
2014-01-20 16:15:30 +01:00
Adrien Grand 6469f6ef06 Return a conflict when trying to enable/disable norms.
Close #4761
2014-01-20 16:13:58 +01:00
Simon Willnauer f0bce08c30 Return `MatchNoDocsQuery` if query string is emtpy
Closes #3952
2014-01-20 16:08:57 +01:00
Luca Cavanna c8d661608c Follow-up of #4808, same fix applied to ToXContent.MapParams 2014-01-20 15:40:40 +01:00
Alexander Reelsen 53dab85fa2 Fix logging on immediate exit on start
If elasticsearch was started in the foreground an immediate exit on startup
led to logging in the logfile, where as when starting in the background,
an immediate exit logged to stdout.

Closes #4805
2014-01-20 15:31:54 +01:00
Luca Cavanna 32428bf683 Accept the same boolean values in RestRequest
Added `no` as a possible value to `paramBooleanAsOptional`, also reused existing code from `Booleans.parseBoolean`

Closes #4808
2014-01-20 14:27:35 +01: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
Florian Gilcher eed079aaac Reference docs fixes
* Make it clearer that `aggs` is an allowed synomym
  for the `aggregations` key
* Fix broken example in for datehistogram, `1.5M` is
  not an allowed interval
* Make use of colon before examples consistent
* Fix typos
2014-01-20 12:14:17 +01:00
Luca Cavanna 8b2fe44fe3 [TEST] Better fix for missing create spec
create is a shortcut to index with op_type=create that the clients support
2014-01-20 12:10:43 +01:00
Adrien Grand 62b044697a Fix test bug: test expects at least one child document. 2014-01-20 11:56:27 +01:00
Luca Cavanna 3d0c06e2f4 [TEST] Added create api (hardcoded) to REST tests suite as it has no spec but it's just a variation of the index api 2014-01-20 11:51:23 +01:00
Dawid Weiss ae71b25145 Documentation typo. 2014-01-20 11:51:08 +01:00
Martijn van Groningen 5bc2a39763 [TESTS] Mapping update might get applied before the first document is indexed on replica, so it is better not to check if the new field isn't available before re-indexing first document. 2014-01-20 11:49:52 +01:00
Matthias Wahl c42f7708be fix IndexOutOfBoundsException on _all field without tokens and keyword analyzer
fix AllEntries to only compute boost when there are actually some Entries available for the _all field

Closes #4771
2014-01-20 11:27:58 +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
Martijn van Groningen a7a2f4747d Consume the entire weight and pre compute the DocIdSets for all segments instead of keeping the weight around and build a DocIdSet when a segment is being processed. This fixes issues where the has_child / has_parent filter produce no results or errors on subsequent scan requests.
Also made CustomQueryWrappingFilter implement Releasable in order to cleanup the pre-computed DocIdSets.

Closes #4703
2014-01-20 11:08:29 +01:00
Martijn van Groningen db394117c4 Made sure that any filter that wraps a p/c filter (has_child & has_parent) either directly or indirectly will never be cached by making CustomQueryWrappingFilter extend from NoCacheFilter.
Closes #4757
2014-01-20 10:54:09 +01:00
Simon Willnauer 0e418d18a4 Added no-cache infrastucture the the filter cache.
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper).
Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached.

Relates to #4757
2014-01-20 10:45:13 +01:00
Alexander Reelsen e34a35244c [DOCS] Added documentation for CAT Aliases API
Added asciidoc. Added new lines in java class.
2014-01-20 09:23:00 +01:00
Clinton Gormley 5003ca9278 [DOCS] Fixed file:/// URL for installing plugins 2014-01-20 01:34:12 +01:00
Simon Willnauer 67efe8777a Remove unnecessary optimize call that destabelizes test 2014-01-18 20:06:55 +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
Adrien Grand 6159343c61 Fix HistogramAggregationSearchBenchmark. 2014-01-17 22:29:27 +01:00
Andy Goldstein 8f659bccb1 Add documentation for transport.publish_port 2014-01-17 22:06:22 +01:00
Andy Goldstein b674827eb6 Add transport.publish_port setting
Add transport.publish_port setting to allow users to specify the port
other cluster members should use when connecting to an instance. This
is needed for systems such as OpenShift, where cluster communication
needs to use a publicly accessibly proxy port, because the normal port
(9300) is bound to a private loopback IP address.
2014-01-17 22:06:22 +01:00
b.hwang d87c417a2e Merge pull request #4792 from mrsolo/master
build randomization, modify how local mode is run
2014-01-17 12:54:20 -08:00