Commit Graph

7112 Commits

Author SHA1 Message Date
Simon Willnauer e6ace1313e [DOCS]: fixed added / coming tags in docs 2014-01-22 12:02:37 +01:00
Simon Willnauer 1615aba114 Replace Version checks against 1.0 with 1.0RC2 2014-01-22 12:02:37 +01:00
Simon Willnauer d49f099fdb Added tests that ensures all version are in the Version#fromId(int) switch statement 2014-01-22 11:29:29 +01:00
Simon Willnauer 994ad77032 Add 1.0.0RC2 to the version table 2014-01-22 11:29:28 +01:00
Martijn van Groningen 2981edca54 [DOCS] `coming` instead of `added` for copy_to feature. 2014-01-22 11:26:22 +01:00
Martijn van Groningen 5a61a8b098 [DOCS] annotated the multi fields and copy_to feature with the right version. 2014-01-22 11:16:41 +01:00
Adrien Grand 080ce71d54 Make all aggregators reader-context-aware.
This removes the overhead of polling a Bytes/Double/Long-Values instance in
every call to collect.

Additionally, the AggregationsCollector has been changed to wrap a simple array
instead of an ArrayList.

Close #4841
2014-01-22 11:05:55 +01:00
Adrien Grand 9282ae4ffd Terms aggregations: make size=0 return all terms.
Terms aggregations return up to `size` terms, so up to now, the way to get all
matching terms back was to set `size` to an arbitrary high number that would be
larger than the number of unique terms.

Terms aggregators already made sure to not allocate memory based on the `size`
parameter so this commit mostly consists in making `0` an alias for the
maximum integer value in the TermsParser.

Close #4837
2014-01-22 11:05:10 +01:00
Martijn van Groningen 75778d082b [DOCS] Moved multi fields documentation into the core-types page
Removed docs about setting inheriting (was never added)
Made mapping samples formatting similar as other ones.
2014-01-22 10:05:58 +01:00
Lee Hinman 2f910fbf7e Accept `defaultOperator` in addition to `default_operator` for simple_query_string 2014-01-21 15:51:06 -07:00
Adrien Grand 1047267021 HistogramAggregator: Finer-grained rounding.
The way `HistogramAggregator` works is that for every value, it is going to
compute a rounded value, that basically looks like
`(value / interval) * interval` and use it as a key in a hash table to
aggregate counts.

However, the exact rounded value is not needed yet at that stage, all we need
is a value that uniquely identifies the bucket, such as `(value / interval)`.
We could only multiply with `interval` again when building the bucket: this way
the second step is only performed once per bucket instead of once per value.

Although this looks like a micro optimization for the case that was just
decribed, it makes more sense with the date rounding implementations that we
have that are more CPU-intensive.

Close #4800
2014-01-21 17:39:01 +01:00
Adrien Grand 92a026b3b9 Throw an ElasticsearchIllegalArgumentException when allocating on a non-data node.
Today, it would fail with a NullPointerException.

Close #4833
2014-01-21 17:31:12 +01:00
Lee Hinman 510fbf12c3 Fix formatting of license header 2014-01-21 09:24:56 -07:00
Lee Hinman 2c289fb538 Add the ability to retrieve fields from field data
Adds a new FetchSubPhase, FieldDataFieldsFetchSubPhase, which loads the
field data cache for a field and returns an array of values for the
field.

Also removes `doc['<field>']` and `_source.<field>` workaround no longer
needed in field name resolving.

Closes #4492
2014-01-21 09:13:32 -07:00
Simon Willnauer 53192919c6 Move to [2.0] snap 2014-01-21 17:07:39 +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
Adrien Grand fe351f14e8 Document `index.shard.check_on_startup`. 2014-01-21 15:55:59 +01:00
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