Commit Graph

7442 Commits

Author SHA1 Message Date
Kevin 850b9d4aab Add failures reason to delete by query response
Closes #5093
2014-02-26 13:14:52 +01:00
Dawid Weiss bdced9c772 Class name typo. 2014-02-26 09:54:55 +01:00
Dawid Weiss d25c14a9e9 Minor cleanups. 2014-02-26 09:52:53 +01:00
Luca Cavanna c58c9cd352 Refactored TransportIndexReplicationOperationAction to be able to expose the shard id related to a shard failure
The `ShardOperationFailedException` is now created within `TransportIndexReplicationAction` passing in the current shard id as a constructor argument.
Also replaced `AtomicReferenceArray<Object>` with `AtomicReferenceArray<ShardActionResult>`, where `ShardActionResult` wraps the `ShardResponse` or the failure, containing all the needed info.
2014-02-25 17:29:12 +01:00
Dawid Weiss ad547eb7fb Remove nanoTime in global cluster randomization in favor of deriving the
seed from the main master seed. Removed shared cluster's seed entirely.

The problem here is that if you don't give cluster's seed then test times
fluctuate oddly, even for a fixed -Dtests.seed=... This shouldn't be the
case -- ideally, the test ran with the same master seed should reproduce
pretty much with the same execution time (and internal logic, obviously).

From the code point of view "global" variables are indeed a problem
because JUnit has no notion of before-suite hooks. And RandomizedRunner
doesn't support context accesses in static class initializers (this is
intentional because there is no way to determine when such initializers
will be executed). A workaround is to move such static global variables to
lazily-initialized methods and invoke them (once) in @BeforeClass hooks.
2014-02-25 16:51:55 +01:00
Shay Banon 83ae1bd55e remove thread local recycler
the thread local recycler requires obtain and recycle to be called on the same thread, while other recyclers do not. Also, it can create heavy recycle usage since it depends on the threads that its being used on. The concurrent / pinned thread base one is by far better than the pure thread local (and is the default) one since it more easily bounds the elements recycled, while still allowing to mix obtain and recycle across threads.

We will end up using the paged recyclers more and more, for example, in our networking output buffer, where obtaining will happen on one thread, while recycling can potentially occur on another thread (the callback thread). Since the limit of binding to a thread of the 2 calls is not really needed, and our best implementation supports going cross threads, there is no real need to impose this restriction.
2014-02-25 14:59:41 +01:00
Simon Willnauer 46fe348b8b Add coming 0.90.12 version to the constants 2014-02-25 10:35:01 +01:00
Simon Willnauer 4a48b93cf5 Implement BlendedTermQuery#extractTerms to support highlighing.
some of the highlighters require term extraction to be implemented in
order to work. BlendedTermQuery doesn't implement the trivial extraction.

Closes #5246
2014-02-25 10:13:08 +01:00
Holger Hoffstätte bac09e2926 Recycler: better lifecycle control for pooled instances (#5214)
- introduce additional destroy() callback that allows better control
over internals of recycled data
- introduced AbstractRecyclerC as superclass for Recycler factories
(Adrien) with empty destroy() by default
- added tests for destroy()
- cleaned up Recycler tests (reduce copy&paste)
2014-02-25 08:49:13 +01:00
javanna 16e350b266 Made SearchContextHighlight.Field class immutable to prevent from erroneously updating it, as it doesn't necessarily map to a single field
A Field instance can map to multiple actual fields when using wildcard expressions. Each actual field should use the proper highlighter depending on the available data structure (e.g. term_vectors), while we currently select the highlighter for the first field and we keep using the same for all the fields that match the wildcard expression.

Modified also how the PercolateContext sets the forceSource option, in a global manner now rather than per field.

Closes #5175
2014-02-25 00:17:01 +01:00
Simon Willnauer 92f132aede Need use ensureYellow() b/c get mapping request checks on actual shard instead of master node 2014-02-24 20:58:44 +01:00
Martijn van Groningen 8c3fa0551f Need use ensureYellow() b/c get mapping request checks the mapping on the master node 2014-02-24 17:49:45 +01:00
Martijn van Groningen 7064056d13 Added TransportGetFieldMappingsIndexAction that uses TransportSingleCustomOperationAction as base class, with the goal to reuse common logic (like: retry on failures, shard picking, connecting to nodes) 2014-02-24 15:54:24 +01:00
Martijn van Groningen d63ab4bd05 [TEST] Added get field mapping test variant that tests with a cluster that has a master only node. 2014-02-24 14:49:22 +01:00
Boaz Leskes 3e10810a8e Change GetFieldMapping API to broadcast requests to nodes hosting the relevant indices.
This is due to the fact that have to have mappers in order to return the response.

Closes #5177
2014-02-24 14:49:22 +01:00
David Pilato ad8a482d19 NPE in PluginsService when starting elasticsearch with a wrong user
When starting elasticsearch with a wrong linux user, it could generate a `NullPointerException` when `PluginsService` tries to list available plugins in `./plugins` dir.

To reproduce:

* create a plugins directory with `rwx` rights for root user only
* launch elasticsearch from another account (elasticsearch for example)

It was supposed to be fixed with #4186, but sadly it's not :-(

Closes #5195.
2014-02-24 11:47:13 +01:00
Clinton Gormley 03ad168b24 [DOCS] Added note about dely in clearing filter cache.
Closes #5231
2014-02-24 11:36:22 +01:00
hura 818f8c0e2b [DOCS] Fix wrong explanation in configuration.asciidoc
Replaced network.host with node.name to match config file
2014-02-24 11:29:50 +01:00
Igor Motov 7209f9f40b Open correct (renamed) index on restore
Closes #5212
2014-02-22 19:05:36 -05:00
Igor Motov dab1f76e03 Restore process should replace the mapping and settings if index already exists
Closes #5210
2014-02-22 18:28:19 -05:00
Luca Cavanna 4e6610a798 Fixed multi term queries support in postings highlighter for non top-level queries
In #4052 we added support for highlighting multi term queries using the postings highlighter. That worked only for top-level queries though, and not for multi term queries that are nested for instance within a bool query, or filtered query, or a constant score query.

The way we make this work is by walking the query structure and temporarily overriding the query rewrite method with a method that allows for multi terms extraction.

Closes #5102
2014-02-21 21:43:40 +01:00
javanna e913b6626f Fixed field names returned when using wildcard expression to specify fields to highlight
Closes #5221
2014-02-21 18:56:35 +01:00
javanna d94b25278a Fixed per-field forceSource highlighting option
Closes #5220
2014-02-21 17:46:32 +01:00
Adrien Grand edb854d952 Document the indices segments response format. 2014-02-21 12:01:32 +01:00
uboness 164f7b981e Fixed an issue where and IndexOutOfBoundsException was thrown when a date_/histogram aggregation was defined on unmapped field and also had a sub aggregation. The root cause there was that in such case, the estimated bucket count was 0, and the code was not designed to handle that well.
Closes #5179
2014-02-21 02:51:46 +01:00
Benjamin Devèze 57fcd761f2 Fix possible exception in toCamelCase method 2014-02-21 00:08:13 +01:00
Benjamin Devèze bb219eff8d Remove useless URL instanciation 2014-02-21 00:07:48 +01:00
Kelsey Francis 55101edb46 Fix yamlBuilder() to return YAML builder instead of SMILE
Closes #5185
2014-02-21 00:00:28 +01:00
Lee Hinman 8f8cc7205d Add "locale" parameter to query_string and simple_query_string
Fixes #5128

Remove java 7 specific Locale functions, add "coming[1.1.0]" to documentation

add LocaleUtils utility class for dealing with Locale functions
2014-02-20 15:53:08 -07:00
Adrien Grand 96d028e721 Disable RAM usage estimation on Lucene 3.x segments.
Close #5201
2014-02-20 23:45:22 +01:00
uboness 428080b49a Changed the caching of FieldDataSource in aggs to be based on field name + required Value Source type as a combi key (used to be only field name). This fixes a problem where multiple aggregations where defined on the same field, yet require different types of value sources.
Closes #5190
2014-02-20 22:33:32 +01:00
Bill Hwang db57f7ed0e Add thrid party license generation profile 2014-02-20 10:05:10 -08:00
David Pilato ecb3df6f4c Wait for REST Service to start
When running tests for site plugins, it could happen that the REST Service is not fully started and not ready immediately to serve HTTP requests.
It gives `503 Service Unavailable` error in that case.

This patch will gives 5 seconds before failing the test.
2014-02-20 17:57:58 +01:00
Martijn van Groningen a665d514a8 [TEST] Removed whitespace between } and , 2014-02-20 17:45:49 +01:00
Martijn van Groningen a81a4a5efe [DOCS] Included the `_percolator` index breaking change to migration docs. 2014-02-20 16:43:06 +01:00
Dawid Weiss aa3897280c The seed format is suite:method, clarified it in the docs. 2014-02-20 16:01:23 +01:00
Martijn van Groningen 57f40fe691 [TEST] Added whitespaces after brackets, colons and commas in nested percolator test. 2014-02-20 16:00:27 +01:00
Isabel Drost-Fromm ff7a9ff1fd Fixing license headers. 2014-02-20 14:35:57 +01:00
Isabel Drost-Fromm 48004ff8a5 Add mustache templating to query execution.
Adds support for storing mustache based query templates that can later be filled
with query parameter values at execution time. Templates may be both quoted,
non-quoted and referencing templates stored in config/scripts/*.mustache by file
name.

See docs/reference/query-dsl/queries/template-query.asciidoc for templating
examples.

Implementation detail: mustache itself is being shaded as it depends directly on
guava - so having it marked optional but included in the final distribution
raises chances of version conflicts downstream.

Fixes #4879
2014-02-20 12:21:59 +01:00
Adrien Grand f5b3c08df2 Make _exists_/_missing_ behave consistently with exists/missing.
`_exists_` and `_missing_` miss field name expansion that `exists` and
`missing` have, which allows these filters to work on `object` fields.

Close #5142
2014-02-20 09:01:56 +01:00
Simon Willnauer d5f1e6f236 [TEST] Update testNGramCopyField to reflect the effect of an index_analyzer 2014-02-19 22:51:34 +01:00
javanna 1bca4971fa [TEST] Added index templates tests for broken mapping and invalid settings scenarios 2014-02-19 20:03:12 +01:00
Simon Willnauer 8fe4d878eb Added tests for empty token chars on ngram tokenizer
This relates to #5120
2014-02-19 19:08:35 +01:00
javanna 1a48c5fc21 [TEST] Initialization errors are checked before returning "no tests to run" error
If there initialization errors and no tests to execute at the same time, better to return the initialization errors, whose check should be first then, as it might be that the "no tests to execute" is caused by the initialization errors.
2014-02-19 19:02:15 +01:00
javanna 419db6ee12 [DOCS] Fixed typo in create index api 2014-02-19 17:49:38 +01:00
Alexander Reelsen d4c506ec65 Added script to extract release notes
Just call ./es_release_notes.pl <issue-tag> to get all release notes.

By default html output is returned, but you can switch to markdown by calling
./es_release_notes.pl <issue-tag> markdown
2014-02-19 13:43:40 +01:00
javanna 1d543432dd [TEST] Added tests for alias filter that is valid json but not a valid filter 2014-02-19 12:42:46 +01:00
javanna d3ed795372 Alias code cleanup
- Renamed IndexMetaData#removerAlias to removeAlias
- Removed IndexTemplateMetaData#fromXContentStandalone unused method (relates to #4511)
- MetaDataIndexAliasesService fix typo in comment
- Alias removed unused constructor that accepts both alias name and filter
2014-02-19 12:04:30 +01:00
Simon Willnauer 4902dd1da6 Add test and randomization for #5165 2014-02-19 11:06:09 +01:00
jayesh.modi 3dec916ef2 Fix SearchContext from being closed prematurely
Fixes SearchContext from being closed during initialization or immediately
after processing is started

Closes #5165
2014-02-19 11:06:09 +01:00