Commit Graph

14640 Commits

Author SHA1 Message Date
Simon Willnauer 04c5dab3d9 Add basic recovery prioritization to GatewayAllocator
This commit adds logic to prefer shards with higher priority
or from newer indicse to be allocated first if they are unallocated post API.

This commit allows users to set `index.priority` to a non-negative integer to
prioritize index recovery for certain indices. This setting is dynamically updateable
and defaults to `0`. If two indices have the same priority this change takes the creation
date into account to prioritize shards from newer indices which is important in the time-based
indices usecase.

Closes #11787
2015-07-06 22:51:34 +02:00
Robert Muir 546e99f072 Merge pull request #12061 from rmuir/plugin-integration-tests
Add integration test harness for plugins
2015-07-06 16:03:56 -04:00
David Pilato 1a3eb4d83a Upsert does not use ttl value
When running an upsert which defines a ttl value, the ttl value is set to null and ignored.

Related to #3256#issuecomment-64963409
2015-07-06 21:57:41 +02:00
Robert Muir 23dfb5f1a5 don't try to run tests for packaging=pom 2015-07-06 15:49:57 -04:00
Robert Muir d7bc274690 Merge branch 'master' into plugin-integration-tests
Conflicts:
	core/pom.xml
2015-07-06 15:15:15 -04:00
Robert Muir 9a146b9e75 Get delete by query rest tests running 2015-07-06 15:13:50 -04:00
Christoph Büscher 201dc87aae Fix: Use correct OpType on Failure in BulkItemResponse
When a bulk request fails on a Delete or Update request, the BulkItemResponse
reports incorrect "index" operation in the response. This PR fixes this
for the case of closed indices as reported in #9821 but also for
other failures and adds tests for the two cases covered.

Closes #9821
2015-07-06 20:20:54 +02:00
Robert Muir 75285cee88 factor out this helper 2015-07-06 14:19:28 -04:00
Igor Motov 177180ac94 Fix snapshot-related REST integration tests 2015-07-06 14:16:28 -04:00
Robert Muir 7595104ec3 Factor integration tests logic to separate build file 2015-07-06 13:59:16 -04:00
Robert Muir 3cb95d7595 Merge branch 'master' into plugin-integration-tests 2015-07-06 13:34:32 -04:00
Martijn van Groningen fb6daebe34 scroll: Append the shard top docs in such a way that ArrayIndexOutOfBoundsException is impossible to occur.
also added AtomicArray#setOnce() method to be sure that we fail if an shard response has already been set
2015-07-06 19:33:28 +02:00
Robert Muir a7b4a061be don't pull outdated/old packages. 2015-07-06 13:32:46 -04:00
Ryan Ernst ff0f480938 Merge pull request #12014 from rjernst/remove/mapper-doc-values
Completely move doc values and fielddata settings to field types
2015-07-06 10:21:09 -07:00
Ryan Ernst 184b1cbd68 Fix fake field mapper to not pass null for defaultfieldtype 2015-07-06 10:20:19 -07:00
Christoph Büscher 6c02301032 Merge pull request #12057 from cbuescher/feature/query-refactoring-spancontaining
Query refactoring: SpanContainingQueryBuilder and Parser
2015-07-06 19:13:11 +02:00
Ryan Ernst 91e3cdb187 Addressed PR comments 2015-07-06 10:02:53 -07:00
Christoph Büscher 9897a5a6e7 Changed creation of test query 2015-07-06 18:44:16 +02:00
Robert Muir 1c114110c5 integration tests need the zip 2015-07-06 12:29:30 -04:00
Alex Ksikes afe9c52f07 XMoreLikeThis: fix potentially unpositioned enum 2015-07-06 18:08:06 +02:00
David Pilato 1f04d6c2bb [build] Update maven-invoker-plugin to 2.0.0
Release Notes - Apache Maven Invoker Plugin - Version 2.0.0

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317525&version=12332831

Important Note:

This Release is intended for the bug fix MINVOKER-187 and in this relationship
is was necessary to upgrade the JDK minimum to JDK 1.6. This was the reason for
the version upgrade to 2.0.0.

Bug:

* [MINVOKER-187] - Cloned IT project must be writable

Improvement:

* [MINVOKER-192] - Using fluido skin
2015-07-06 17:54:33 +02:00
Christoph Büscher 4dd59da997 Query refactoring: SpanContainingQueryBuilder and Parser
Moving the query building functionality from the parser to the builders
new toQuery() method analogous to other recent query refactorings.

Relates to #10217
2015-07-06 17:29:33 +02:00
David Pilato 54c0b565ef Merge branch 'master' of https://github.com/elastic/elasticsearch 2015-07-06 17:23:34 +02:00
Robert Muir d7dab0df72 fix test to allow integration tests 2015-07-06 11:20:30 -04:00
David Pilato e7a6b51bab [maven] change groupId / artifactId
When we generate our project, we can get something like:

```
├── dev-tools
├── elasticsearch
├── elasticsearch-parent
├── elasticsearch-plugin
├── plugin
│   ├── elasticsearch-analysis-icu
│   ├── elasticsearch-analysis-kuromoji
│   ├── elasticsearch-analysis-phonetic
│   ├── elasticsearch-analysis-smartcn
│   ├── elasticsearch-analysis-stempel
│   ├── elasticsearch-cloud-aws
│   ├── elasticsearch-cloud-azure
│   ├── elasticsearch-cloud-gce
│   ├── elasticsearch-delete-by-query
│   ├── elasticsearch-lang-javascript
│   └── elasticsearch-lang-python
├── rest-api-spec
└── securemock
```

I propose here to use a common naming for artifacts: start always with `elasticsearch-`.
Also, move `elasticsearch-plugin` to `org.elasticsearch.plugin` groupId.

So we could have:

```
├── elasticsearch
├── elasticsearch-dev-tools
├── elasticsearch-parent
├── elasticsearch-rest-api-spec
├── elasticsearch-securemock
├── plugin
│   ├── elasticsearch-analysis-icu
│   ├── elasticsearch-analysis-kuromoji
│   ├── elasticsearch-analysis-phonetic
│   ├── elasticsearch-analysis-smartcn
│   ├── elasticsearch-analysis-stempel
│   ├── elasticsearch-cloud-aws
│   ├── elasticsearch-cloud-azure
│   ├── elasticsearch-cloud-gce
│   ├── elasticsearch-delete-by-query
│   ├── elasticsearch-lang-javascript
│   ├── elasticsearch-lang-python
│   └── elasticsearch-plugin
```
2015-07-06 17:17:07 +02:00
Christoph Büscher 52c89438b4 Merge pull request #12052 from cbuescher/docs-strategy-filtered
Docs: Delete unsupported `strategy` parameter in filtered-query.asciidoc
2015-07-06 16:58:06 +02:00
Robert Muir 3f4b8df00d Merge pull request #12026 from rmuir/integ_tests
add integration test harness to maven build
2015-07-06 10:16:54 -04:00
Christoph Büscher e2da4eb732 Merge branch 'master' into feature/query-refactoring 2015-07-06 15:47:37 +02:00
Alex Ksikes 8ef1708395 [TEST] fix testMoreLikeThisArtificialDocs
Ensure that the indexed doc hasn't all its fields empty and that the
artificial doc requested is always routed to the shard having that doc.
2015-07-06 15:27:38 +02:00
Christoph Büscher 1548e845e4 Update filtered-query.asciidoc 2015-07-06 15:00:13 +02:00
Colin Goodheart-Smithe b93512e000 [TEST] NettyTransportMultiPortTests now checks selected random ports are free before using them 2015-07-06 12:04:22 +01:00
markharwood f95981b977 Search enhancement: adds a special case for the “_index” field which allows queries to test the name of the index. Adding this capability means we can deprecate the specialist indices query.
IndexFieldMapper is changed to make the term query factories produce match_all or match_none queries based on tests on the index name.

Closes #3316
2015-07-06 10:55:28 +01:00
javanna d085088793 BoolQueryBuilder#hasClauses to take into account filterClauses too 2015-07-06 11:02:09 +02:00
javanna 60fa8908d8 BoolQueryBuilder#hasClauses to take into account filterClauses too 2015-07-06 11:00:54 +02:00
Clinton Gormley c5d3c46943 Added build and test labels to es release notes script 2015-07-05 20:24:46 +02:00
Clinton Gormley 1e5e4439ce Merge pull request #11983 from cdosborn/patch-1
Grammar fix to match query docs
2015-07-05 18:24:06 +02:00
Boaz Leskes d74eac94f2 ZenDiscovery: #11960 failed to remove eager reroute from node join
It is removed now :)

Closes #12019
2015-07-03 22:06:42 +02:00
Robert Muir 9d233aeaf0 use external test cluster for integration tests 2015-07-03 12:20:35 -04:00
Tanguy Leroux 9495816cb7 Remove sigar completely 2015-07-03 15:49:17 +02:00
Simon Willnauer ac32f3d310 Don't special-case on ElasticsearchWrapperException in toXContent
the specialization can cause stack overflows if an exception is a
ElasticsearchWrapperException as well as a ElasticsearchException.
This commit just relies on the unwrap logic now to find the cause and only
renders if we the rendering exception is the cause otherwise forwards
to the generic exception rendering.

Closes #11994
2015-07-03 13:51:11 +02:00
Ryan Ernst e83ae64ea9 Mappings: Completely move doc values and fielddata settings to field types
While MappedFieldType contains settings for doc values and fielddata,
AbstractFieldMapper had special logic in its constructor that
required setting these on the field type from there. This change
removes those settings from the AbstractFieldMapper constructor.
As a result, defaultDocValues(), defaultFieldType() and
defaultFieldDataType() are no longer needed.
2015-07-03 03:10:20 -07:00
Michael McCandless 275fdcc08d fix silly smoke_test_plugin bugs when ES actually succeeds in starting with the installed plugins 2015-07-03 05:59:16 -04:00
javanna d225a8f56c Merge branch 'master' into feature/query-refactoring 2015-07-03 10:10:54 +02:00
Martijn van Groningen 13602a591f Removed forcedDateParser from hashCode() and equals() as it holds no value when it comes to equality. 2015-07-03 10:04:22 +02:00
Christoph Büscher faa4e98aa5 Merge pull request #11915 from cbuescher/feature/query-refactoring-emptyquerybuilder
Query Refactoring: Make parsing nested queries always return query builder
2015-07-03 09:55:29 +02:00
Christoph Büscher c51cfbb6d0 Query Refactoring: Make sure that parsing nested queries always returns an query builder
Currently parsing inner queries can return `null` which leads to unnecessary complicated
null checks further up the query hierarchy. By introducing a special EmptyQueryBuilder
that can be used to signal that this query clause should be ignored upstream where possible,
we can avoid additional null checks in parent query builders and still allow for this query
to be ignored when creating the lucene query later.

This new builder returns `null` when calling its `toQuery()` method, so at this point
we still need to handle it, but having an explicit object for the intermediate query
representation makes it easier to differentiate between cases where inner query clauses are
empty (legal) or are not set at all (illegal).

Also added check for empty inner builder list to BoolQueryBuilder and OrQueryBuilder.
Removed setters for positive/negatice query in favour of constructor with
mandatory non-null arguments in BoostingQueryBuilder.

Closes #11915
2015-07-03 09:26:48 +02:00
Simon Willnauer 20d0b4f446 Promote headers to first class citizens on exceptions
This commit merges the pre-existing special exception that
allowed to associate headers with exceptions and the elasticsaerch
base class `ElasticsearchException` This allows for more generic use
of exceptions where plugins can associate meta-data with any elasticsearch
base exception to control behavior etc.

This also addds a generic SecurityException to allow plugins to pass on
information based on the RestStatus.
2015-07-03 08:58:44 +02:00
Robert Muir 80871bae2b Add simple integ testing infra 2015-07-03 02:12:01 -04:00
Boaz Leskes 3084bed194 Test: force local transport in ZenDiscoveryTests.testHandleNodeJoin_incompatibleMinVersion
Otherwise we ignore the join request due to a transport address mismatch instead of failing it.
2015-07-02 22:20:12 +02:00
Robert Muir 3171f52461 Merge pull request #12001 from rmuir/no_dont_do_that
Don't add CWD to classpath when ES_CLASSPATH isn't set.
2015-07-02 14:53:24 -04:00