Commit Graph

10191 Commits

Author SHA1 Message Date
Alexander Reelsen faff0f86f0 Plugins: Support usage of ES_JAVA_OPTS in plugin commands
As that environment variable can contain elasticsearch specific configuration
like the path to a configuration, it makes sense to support in both
elasticsearch commands.

Closes #8288
2014-10-30 13:41:08 +01:00
Satoyuki Tsukano e3d5cb903b Core: Fix location information for loggers
This change corrects the location information gathered by the loggers so that when printing class name, method name, and line numbers in the log pattern, the information from the class calling the logger is used rather than a location within the logger itself.

A reset method has also been added to the LogConfigurator class which allows the logging configuration to be reset. This is needed because if the LoggingConfigurationTests and Log4jESLoggerTests are run in the same JVM the second one to run needs to be able to override the log configuration set by the first

Closes #5130, #8052
2014-10-30 09:31:53 +00:00
Simon Willnauer 67394aad81 [TEST] Upgrade test can only run if major or minor version differs 2014-10-29 20:34:07 +01:00
Colin Goodheart-Smithe cd7c6cc47c Revert "Core: Fix location information for loggers"
This reverts commit 4ebbb657d8.
2014-10-29 17:08:53 +00:00
Colin Goodheart-Smithe 3d436a25b0 Revert "[TEST] Added awaits fix to failing LoggingConfigurationTests"
This reverts commit f8ea7c15d7.
2014-10-29 17:08:52 +00:00
Colin Goodheart-Smithe b4c85f60b8 Revert "[TEST] added additional logging to LoggingConfigurationTests"
This reverts commit c639815af9.
2014-10-29 17:08:51 +00:00
Colin Goodheart-Smithe d9fffd32be Revert "[TEST] added more additional logging to LoggingConfigurationTests"
This reverts commit b3a60130ba.
2014-10-29 17:08:50 +00:00
Colin Goodheart-Smithe 75b98cf8b7 Revert "[TEST] re-enabled AwaitsFix for LoggingConfigurationTests"
This reverts commit c548a52657.
2014-10-29 17:08:45 +00:00
Colin Goodheart-Smithe c548a52657 [TEST] re-enabled AwaitsFix for LoggingConfigurationTests 2014-10-29 16:13:50 +00:00
Michael McCandless 7506255263 Upgrade to Lucene 4.10.2 2014-10-29 11:21:51 -04:00
Colin Goodheart-Smithe b3a60130ba [TEST] added more additional logging to LoggingConfigurationTests
This is to try to determine why the test passes locally but not on the CI builds
2014-10-29 14:20:10 +00:00
cmpich e57c8b0673 Docs: Update getting-started.asciidoc
Closes #8195
2014-10-29 15:04:13 +01:00
cmpich 36462c0305 Docs: Update getting-started.asciidoc
Closes #8194
2014-10-29 15:01:18 +01:00
Clinton Gormley 8f02c451b8 Update source-field.asciidoc
very minor typofix

Closes #8066
2014-10-29 14:51:05 +01:00
Clinton Gormley 6a7f55b61d Docs: Updated Perl client page to mention async client
Closes #8012
2014-10-29 14:48:56 +01:00
Colin Goodheart-Smithe c639815af9 [TEST] added additional logging to LoggingConfigurationTests
This is to try to determine why the test passes locally but not on the CI builds
2014-10-29 13:34:25 +00:00
Colin Goodheart-Smithe f8ea7c15d7 [TEST] Added awaits fix to failing LoggingConfigurationTests 2014-10-29 13:03:37 +00:00
Boaz Leskes 8eac79c2f3 Recovery: change check for finished to a ref count check
we current check that the recovery is not finished when people access the status local variables. This is wrong and we should check for the refcount being > 0 as it is OK to use the status after it has marked as finished but there are still on going, in-flight reference to it.

Relates to #8092

Closes #8271
2014-10-29 12:29:28 +01:00
Satoyuki Tsukano 4ebbb657d8 Core: Fix location information for loggers
This change corrects the location information gathered by the loggers so that when printing class name, method name, and line numbers in the log pattern, the information from the class calling the logger is used rather than a location within the logger itself.

Closes #5130
2014-10-29 10:24:23 +00:00
Alex Ksikes 35f55608cc MLT Field Query: remove it from master
The MLT field query is simply replaced by a MLT query set to specififc field.
To simplify code maintenance we should deprecate it in 1.4 and remove it in
2.0.

Closes #8238
2014-10-29 10:19:00 +01:00
Simon Willnauer bf1aed14db [SCRIPTS] GetIndexedScript call can deadlock
GetIndexedScript can deadlock since they perform blocking operation
on the network thread. This commit moves the blocking to an async operation
2014-10-29 09:54:42 +01:00
Simon Willnauer e3a09e1933 [TEST] Move rebalance setting to the index level / pass it on index creation 2014-10-29 09:24:35 +01:00
Simon Willnauer b23e6e0593 [TEST] initialize SUITE | GLOBAL scope cluster in a private random context
Today any call to the current randomized context modifies the random
sequence such that cluster initialization is context dependent. If due
to an error for instance a static util method is used like `randomLong`
inside the TestCluster instead of the provided Random instance all
reproducibility guarantees are gone. This commit adds a safe mechanism
to initialize these clusters even if a static helper is used. All none
test scope clusters are now initialized in a private randomized context.
2014-10-28 23:53:25 +01:00
Areek Zillur 96f1606cdc Completion Suggester: Fix CompletionFieldMapper to correctly parse weight
- Allows weight to be defined as a string representation of a positive integer

closes #8090
2014-10-28 18:39:02 -04:00
Michael McCandless 462336c135 Test: fix test to optimize and flush in the end to try to prevent 'Delete Index failed - not acked' 2014-10-28 18:20:30 -04:00
Michael McCandless d988302860 Tests: stop printing all thread stacks on failure: it's too noisy 2014-10-28 17:57:17 -04:00
Simon Willnauer 31db8cca4e s/MapBuilder/singletonMap in InternalEngine 2014-10-28 21:39:51 +01:00
Simon Willnauer 0a072f6fd0 [ENGINE] Add current translog ID to commit meta before closing
Today we simply close the IW when we have to open a new one if ie.
we change merge settings. Yet, the API is deprecated and under the hood
it commits the IW. For safety we should add the current translog ID and
use rollback instead to not wait for merges.
2014-10-28 21:37:21 +01:00
Martijn Laarman 006acfe8bf Added missing percolate API parameters (percolate_routing, percolate_preference) to the REST API Spec
Closes #7173
2014-10-28 19:34:34 +01:00
Jérémy Lecour ed406fb154 Use the simpler command line syntax in the Debian init script
It's definitely not a blocker, but it would be nice to be consistent.

Closes #5033
2014-10-28 19:31:06 +01:00
uboness ae1e9edb25 Enabled overriding the request headers in the clients
One can set the headers sent with request by the clients by setting the `request.headers` setting. This commit enables overriding any such set headers directly on the requests.
2014-10-28 16:36:17 +01:00
Costin Leau 7b0afaff6c Improve handling of multicast binding exceptions
In case the multicast binding fails (due to socket errors), abort zen
pinging code and throw a better error message
Relates #8225

(cherry picked from commit f819cff77a0ef95b340afc2f22e3464283803960)
2014-10-28 16:57:21 +02:00
Costin Leau 9e7e37076f Introduce elasticsearch.in.bat (i.e. es.in for Windows)
Break-out common functionality between elasticsearch.bat and service.bat
Relates #8237

(cherry picked from commit 87095e79534bcef97b2b275322c924bd96b34e3b)
2014-10-28 16:33:20 +02:00
Clinton Gormley b94b3b2bcd Tests: Refixed the put_alias tests
The missing/null index parameter is in the URL, not the body.
So it should be required, and throw a param error if not provided.

Relates #7863
2014-10-28 13:39:05 +01:00
Uwe Schindler 1d95630a35 Make indexQueryParserService available. Closes #8248 2014-10-28 12:30:36 +01:00
Clinton Gormley f9b5906871 Test: Change missing/null alias test to catch a request error, not a param error
Relates: #7863
2014-10-28 11:43:10 +01:00
Dmitriy Khvatov 71a90ab4fe Docs: Update multi-get.asciidoc
Duplicate word

Closes #8228
2014-10-28 10:58:47 +01:00
Spencer 055e766be7 Updated paths to be inline with #8240 2014-10-27 23:08:19 -07:00
tlrx 8c864cf3f6 Cat Recovery API: Reverting changes introduced with commit e1c75bae87
Adding these 2 headers to the CAT Recovery made the CI tests hanging for a loooong time.

Related to #8041
2014-10-27 20:49:58 +01:00
Simon Willnauer d6ae832c90 Delegate write.lock to primary directory 2014-10-27 20:03:36 +01:00
Zachary Tong f5b2dfd052 Aliases: Throw exception if index is null or missing when creating an alias
Fixes a bug where alias creation would allow `null` for index name, which thereby
applied the alias to _all_ indices.  This patch makes the validator throw an
exception if the index is null.

```bash
POST /_aliases
{
   "actions": [
      {
         "add": {
            "alias": "empty-alias",
            "index": null
         }
      }
   ]
}
```
```json
{
   "error": "ActionRequestValidationException[Validation Failed: 1: Alias action [add]: [index] may not be null;]",
   "status": 400
}
```

The reason this bug wasn't caught by the existing tests is because
the old test for nullness only validated against a cluster which had
zero indices.  The null index is translated into "_all", and since
there are no indices, this fails because the index doesn't exist.
 So the test passes.

However, as soon as you add an index, "_all" resolves and you get the
situation described in the original bug report:  null index is
accepted by the alias, resolves to "_all" and gets applied to everything.

The REST tests, otoh, explicitly tested this bug as a real feature and therefore
passed.  The REST tests were modified to change this behavior.

Fixes #7863
2014-10-27 14:39:01 -04:00
Alex Ksikes 0be5c60bce MLT Query: use ParseField#withAllDeprecated for percent_terms_to_match
Also the parameter was deprecated but not removed so we keep it in the doc and
mark it as deprecated ...

Closes #8241
2014-10-27 17:35:06 +01:00
Alex Ksikes 991f3e2cd3 Docs: fix tags for dfs and new like parameter 2014-10-27 15:42:44 +01:00
Clinton Gormley fbd0403a6f Documented that HTTP pipelining is not supported 2014-10-27 14:49:48 +01:00
Simon Willnauer 9a5264660d Remove unused imports 2014-10-27 14:26:04 +01:00
Simon Willnauer 5190cee7fc [CORE] remove usage of Directory#fileExists
This commit removes the usage of #fileExists which has been
deprecated long ago an can be a source of race conditions.
2014-10-27 14:21:25 +01:00
Martijn van Groningen 35ede09511 Core: Cleanup non nested filter to not flip the bits in the FixedBitSet returned by the wrapped filter.
If the filter producing the FBS were to be cached then it would flip bits each time the NonNestedDocsFilter was executed.
In our case we cache the NonNestedDocsFilter itself so that didn't happen each time this filter was used.
However the hashcode of NonNestedDocsFilter and NestedDocsFilter was the same, since NonNestedDocsFilter directly used NestedDocsFilter#hashCode()

Closes #8227
Closes #8232
2014-10-27 13:57:52 +01:00
Boaz Leskes da70b5c847 Test: remove wait on events from multipleNodesShutdownNonMasterNodes
The test validates that minimum master node is honored after shutting down nodes. When nodes are restarted we may go through a couple of master election of a master is elected and  discovers some of the old nodes left before all new node have joined. Processing that node failure the master de-elects it self, which is fine because we will start a new master election. Test however runs a clusterHealth call with a  wait for event. This is implemented using a cluster state update task which fails when the master steps down. Longer term fix requires a rewrite of the cluster health API code but a quick fix is not check for events (not needed for this test).
2014-10-27 13:31:27 +01:00
Simon Willnauer a12b34c36c [TEST] Beef up test and replace deprecated API 2014-10-27 13:05:12 +01:00
Adrien Grand 7ea490dfd1 Aggregations: Return the sum of the doc counts of other buckets.
This commit adds a new field to the response of the terms aggregation called
`sum_other_doc_count` which is equal to the sum of the doc counts of the buckets
that did not make it to the list of top buckets. It is typically useful to have
a sector called eg. `other` when using terms aggregations to build pie charts.

Example query and response:

```json
GET test/_search?search_type=count
{
  "aggs": {
    "colors": {
      "terms": {
        "field": "color",
        "size": 3
      }
    }
  }
}
```

```json
{
   [...],
   "aggregations": {
      "colors": {
         "doc_count_error_upper_bound": 0,
         "sum_other_doc_count": 4,
         "buckets": [
            {
               "key": "blue",
               "doc_count": 65
            },
            {
               "key": "red",
               "doc_count": 14
            },
            {
               "key": "brown",
               "doc_count": 3
            }
         ]
      }
   }
}
```

Close #8213
2014-10-27 12:11:26 +01:00