Commit Graph

7143 Commits

Author SHA1 Message Date
Luca Cavanna 107a242d38 Removed put/delete warmer tests that were meant to test that the serialization was bw compatible after adding support for acks 2014-01-24 16:05:02 +01:00
Luca Cavanna 1ef3a4a868 Removed duplicated registration of warmers as custom metadata type
Already done in a static block within IndexMetaData
2014-01-24 15:59:07 +01:00
Martijn van Groningen b18ae14555 Removed old serialization logic (<= 1.0-RC1) in readFrom and writeTo methods. 2014-01-24 15:44:40 +01:00
Simon Willnauer 22eb6ba09d Re-Sort config/names 2014-01-24 14:32:50 +01:00
Adrien Grand 9d10c2fca8 Use different field names based on the data type in aggregations tests.
Tests fail once in a while because of a ClassCastException at the mvel level.
We suspect that this happens because a script that is JIT-ed on a specific
data type cannot later be used with another one, but we didn't manage to
reproduce in our development environments, so let's try to change the field
names to see if this error keeps occurring.
2014-01-24 13:48:43 +01:00
Simon Willnauer 663e25ae63 Throw exception if `cluster.name` is specified in TestCluster node settings
We rely on the `cluster.name` setting to be the same across all nodes
and transport clients etc. If a node setting contains `cluster.name`
the test might not work if a random transport client is swapped
in. Passing such a configuration should result in an exception since
it's clearly an illegal state.
2014-01-24 12:11:29 +01:00
Martijn van Groningen 2d58603e81 Added more unit like test that verifies that has_child is never cached even if wrapped by another filter. 2014-01-24 12:03:00 +01:00
uboness 2f32908193 fixed the reduce of InternalGeoHashGrid when executing on a single shard 2014-01-23 21:09:19 +01:00
David Pilato f4411e697e Serving _site plugins do not pick up on index.html for sub directories
If one asks for `http://es:9200/_plugin/PLUGIN_NAME/` and the the plugin's _site directory contains an index.html file, it will be correctly served.

This is not the case for sub directories: a _site/folder/index.html is not served when requesting  `http://es:9200/_plugin/PLUGIN_NAME/folder/` but one gets a 403 Forbidden response as if trying to browse the folder.

Closes #4845.
2014-01-23 20:40:16 +01:00
Karel Minarik 241bb09db1 [DOCS] More assertive statement about requiring `query` in _count, etc 2014-01-23 20:35:44 +01:00
uboness 56a14e6194 fixed license header indentation 2014-01-23 19:37:08 +01:00
uboness da953700f4 Fixed an issue where there are sug aggregations executing on a single shard, the reduce call was not propagated properly down the agg hierarchy.
Closes #4843
2014-01-23 19:19:55 +01:00
Nik Everett 93a8e80aff Support multiple rescores
Detects if rescores arrive as an array instead of a plain object.  If so
then parse each element of the array as a separate rescore to be executed
one after another.  It looks like this:
   "rescore" : [ {
      "window_size" : 100,
      "query" : {
         "rescore_query" : {
            "match" : {
               "field1" : {
                  "query" : "the quick brown",
                  "type" : "phrase",
                  "slop" : 2
               }
            }
         },
         "query_weight" : 0.7,
         "rescore_query_weight" : 1.2
      }
   }, {
      "window_size" : 10,
      "query" : {
         "score_mode": "multiply",
         "rescore_query" : {
            "function_score" : {
               "script_score": {
                  "script": "log10(doc['numeric'].value + 2)"
               }
            }
         }
      }
   } ]

Rescores as a single object are still supported.

Closes #4748
2014-01-23 16:29:07 +01:00
Nik Everett 37f80c8d80 Documentation for score_mode
Closes #4742
2014-01-23 16:24:48 +01:00
Simon Willnauer 55e8df40cd Move provided lucene-expression jar below the test-framework
Having a dep that refrences lucene-core before the test framework
confuses some runners.
2014-01-23 16:10:57 +01:00
Simon Willnauer 592a411b2c Make shard balancing deterministic if weights are identical
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes #4867
2014-01-23 15:57:49 +01:00
Luca Cavanna 3158776438 Parallelized rivers creation in RiverTests#testMultipleRiversStart
Rivers are now registered concurrently from separate threads, one per river.
2014-01-23 15:39:48 +01:00
Luca Cavanna 2058edc117 Made sure rivers _meta documents are retrieved via get with preference _primary
Closes #4864
2014-01-23 15:01:28 +01:00
Simon Willnauer a7a2d9f806 Remove listeners after suite completes in RestTestSuiteRunner
We need to remove the reproduce info printer after the suite
returns otherwise it might print a bogus line if a subsequent
non-rest test fails. The `RunNotifier` is used across suites in
the same JVM and the listener sticks to it.
2014-01-23 14:49:16 +01:00
Simon Willnauer 416e328cea Mark 'lucene-expression' as 'provided' in pom.xml
We currently pull in the lucene-expression module that is referenced
by lucene-suggest. Yet, we don't make use of this dependency at all
and it pulls in a bunch of unshaded libs like `antlr` and `asm` which
are pretty common in other projects. We should exclude this
dependency since we don't use it at all and it causes problems
when Elasticsearch is used as a node client. (see #4858)

If we mark the dependency as provided it won't be included in the
distribution.

Closes #4859
Closes #4858
2014-01-23 14:23:41 +01:00
Brusic d9b71a8083 [DOCS] various docs fixes
Removed unused misc.asciidoc file
Added plugins directory to directory layout
Fixed transport.tcp.connect_timeout value to match the code found in NetworkService.TcpSettings
Clarified that phrase query does not preserve order of terms
Clarified merge page
Added instructions on how to build documentation to docs/README
2014-01-23 10:52:13 +01:00
Paul Horn ed4b15fb4c ClearScrollRequest should set a type parameter
Since ActionRequest requires a bounded type parameter.
2014-01-23 10:49:23 +01:00
Luca Cavanna 922f51fdd5 Added log line to better debug where rivers will get allocated 2014-01-22 23:26:16 +01:00
Simon Willnauer 0a97134757 Add unit tests for NoCache filter infrastructure
If a filter implements `NoCacheFilter` itself and it's
parents should never be cached even if `_cache` is set
to `true` on the parents explicitly.
2014-01-22 14:56:40 +01:00
Clinton Gormley d70e6c4730 [SPEC] Updated docs URLs to point to master 2014-01-22 14:40:31 +01:00
uboness e9b41c92a4 Added missing support for min_doc_count in DateHistogramBuilder
Closes: #4848
2014-01-22 14:26:28 +01:00
Clinton Gormley 8685818ad3 [DOCS] Moved termvector and mtermvectors from search to docs 2014-01-22 14:10:26 +01:00
Martijn van Groningen 6cdbdaf388 Added test that verifies that p/c filters never cache.
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers.

Relates to #4757
2014-01-22 13:35:52 +01:00
Adrien Grand f466b8f292 Add a basic test for date math in date ranges. 2014-01-22 13:30:09 +01:00
Martijn van Groningen f002d39544 Never cache a range filter that uses the `now` date expression.
Closes #4846
2014-01-22 13:28:08 +01:00
Simon Willnauer cb3bcb05be [DOCS]: Fix added version termvectors.asciidoc 2014-01-22 12:08:13 +01:00
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