Commit Graph

14023 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Martijn van Groningen a4b99e6291 zen: Don't join master nodes or accept join requests of old and too new nodes.
If the version of a node is lower than the minimum supported version or higher than the maximum supported version, a node shouldn't be allowed to join and nodes should join that elected master node

Closes #11924
2015-07-02 20:51:21 +02:00
Ryan Ernst 410704fd18 fix rest tests to not depend on short name access of mappings 2015-07-02 11:37:18 -07:00
Ryan Ernst 0f62950856 fix compile error after bad merge 2015-07-02 10:53:30 -07:00
Ryan Ernst e12bb4a54a Merge pull request #11977 from rjernst/pr/mapper-names
Move short name access out of field type
2015-07-02 10:38:30 -07:00
Robert Muir c598c4cc97 blind stab at windows 2015-07-02 13:27:39 -04:00
Robert Muir 68be95ca1a Don't add CWD to classpath when ES_CLASSPATH isn't set. 2015-07-02 13:16:20 -04:00
javanna 90f32d4d32 Internal: make sure ParseField is always used in combination with parse flags
Removed ParseField#match variant that accepts the field name only, without parse flags. Such a method is harmful as it defaults to empty parse flags, meaning that no deprecation exceptions will be thrown in strict mode, which defeats the purpose of using ParseField. Unfortunately such a method was used in a lot of places were the parse flags weren't easily accessible (outside of query parsing), and in a lot of other places just by mistake.

Parse flags have been introduced now as part of SearchContext and mappers where needed. There are a few places (e.g. java api requests) where it is not possible to retrieve them as they depend on the index settings, in that case we explicitly pass in EMPTY_FLAGS for now, but this has to be seen as an exception.

Closes #11859
2015-07-02 14:30:01 +02:00
Clinton Gormley 6fda658466 Merge pull request #11993 from ozlerhakan/patch-1
Add Mongolastic into Misc
2015-07-02 14:12:11 +02:00
jhr007 72d9914a25 Docs: Save debian repository to it's own sources.list file
Best to put repo definitions in a separate file from that of the core OS's sources.list.

Closes #11953
2015-07-02 13:20:51 +02:00
Simon Willnauer 753376dba7 [TEST] Remove timeout - it's not needed in this test 2015-07-02 13:11:00 +02:00
Colin Goodheart-Smithe 11e851eb0c Change TODO comments for removing old Script API to 3.0 2015-07-02 11:20:17 +01:00
Hakan Özler d259c318eb Add Mongolastic into Misc 2015-07-02 13:05:11 +03:00
Adrien Grand 6765635067 Merge pull request #11988 from jpountz/fix/zlib_skip_underlying
Transport: Do not make the buffer skip while a stream is open.
2015-07-02 10:36:11 +02:00
Britta Weber 6bf543dca8 [TEST] mute IndicesStoreIntegrationTests.indexCleanup 2015-07-02 10:24:06 +02:00
astefan 98d9a2e946 Update CONTRIBUTING.md 2015-07-02 10:58:47 +03:00
Adrien Grand 7482e1362f Transport: Do not make the buffer skip while a stream is open.
This commit changes MessageChannelHandler to not skip the underlying
ChannelBuffer while a StreamInput is open on top of it. In case eg. compression
is enabled, this prevents failures due to the fact that the decompressed
stream input expects a certain structure that it can't verify if the position
of the underlying buffer is changed.
2015-07-02 09:30:28 +02:00
David Pilato 462b5c822c [doc] fix master build
The `:ref:` link in java-api doc is connected to `current` version which is at this time `1.6`.
This commit patch this.

That being said, we might have to change it again once master will become `current` doc.
2015-07-02 07:54:30 +02:00
Robert Muir ce900b4d7a Merge pull request #11982 from rmuir/grr_bad_defaults
really ban exitVM with security policy
2015-07-01 17:58:07 -04:00
uboness 6021bd8cca Parameterized exception messages
Added dynamic arguments to `ElasticsearchException`, `ElasticsearchParseException` and `ElasticsearchTimeoutException`.

This helps keeping the exception messages clean and readable and promotes consistency around wrapping dynamic args with `[` and `]`.

This is just the start, we need to propagate this to all exceptions deriving from `ElasticsearchException`. Also, work started on standardizing on lower case logging & exception messages. We need to be consistent here...

 - Uses the same `LoggerMessageFormat` as used by our logging infrastructure.
2015-07-01 23:08:38 +02:00
David Pilato 1e35674eb0 [doc] Reorganize and clean Java documentation
This commit reorganizes the docs to make Java API docs looking more like the REST docs.
Also, with 2.0.0, FilterBuilders don't exist anymore but only QueryBuilders.

Also, all docs api move now to docs/java-api/docs dir as for REST doc.

Remove removed queries/filters
-----

* Remove Constant Score Query with filter
* Remove Fuzzy Like This (Field) Query (flt and flt_field)
* Remove FilterBuilders

Move filters to queries
-----

* Move And Filter to And Query
* Move Bool Filter to Bool Query
* Move Exists Filter to Exists Query
* Move Geo Bounding Box Filter to Geo Bounding Box Query
* Move Geo Distance Filter to Geo Distance Query
* Move Geo Distance Range Filter to Geo Distance Range Query
* Move Geo Polygon Filter to Geo Polygon Query
* Move Geo Shape Filter to Geo Shape Query
* Move Has Child Filter by Has Child Query
* Move Has Parent Filter by Has Parent Query
* Move Ids Filter by Ids Query
* Move Limit Filter to Limit Query
* Move MatchAll Filter to MatchAll Query
* Move Missing Filter to Missing Query
* Move Nested Filter to Nested Query
* Move Not Filter to Not Query
* Move Or Filter to Or Query
* Move Range Filter to Range Query
* Move Ids Filter to Ids Query
* Move Term Filter to Term Query
* Move Terms Filter to Terms Query
* Move Type Filter to Type Query

Add missing queries
-----

* Add Common Terms Query
* Add Filtered Query
* Add Function Score Query
* Add Geohash Cell Query
* Add Regexp Query
* Add Script Query
* Add Simple Query String Query
* Add Span Containing Query
* Add Span Multi Term Query
* Add Span Within Query

Reorganize the documentation
-----

* Organize by full text queries
* Organize by term level queries
* Organize by compound queries
* Organize by joining queries
* Organize by geo queries
* Organize by specialized queries
* Organize by span queries
* Move Boosting Query
* Move DisMax Query
* Move Fuzzy Query
* Move Indices Query
* Move Match Query
* Move Mlt Query
* Move Multi Match Query
* Move Prefix Query
* Move Query String Query
* Move Span First Query
* Move Span Near Query
* Move Span Not Query
* Move Span Or Query
* Move Span Term Query
* Move Template Query
* Move Wildcard Query

Add some missing pages
----

* Add multi get API
* Add indexed-scripts link

Also closes #7826
Related to https://github.com/elastic/elasticsearch/pull/11477#issuecomment-114745934
2015-07-01 22:19:11 +02:00
Robert Muir 5aa5c98826 really ban exitVM with security policy 2015-07-01 15:40:46 -04:00
David Pilato e429b8d190 [build] include in plugins only needed jars
Follow up for https://github.com/elastic/elasticsearch-analysis-kuromoji/issues/61

We don't shade anymore elasticsearch dependencies, so plugins might include jars in the distribution ZIP file which might not be needed anymore.

For example, `elasticsearch-cloud-aws` comes with:

```
Archive:  cloud-aws/target/releases/elasticsearch-cloud-aws-2.0.0-SNAPSHOT.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
  1920788  05-18-15 09:42   aws-java-sdk-ec2-1.9.34.jar
   503963  05-18-15 09:42   aws-java-sdk-core-1.9.34.jar
   232771  01-19-15 09:24   commons-codec-1.6.jar
   915096  01-19-15 09:24   jackson-databind-2.3.2.jar
   252288  05-18-15 09:42   aws-java-sdk-kms-1.9.34.jar
    62050  01-19-15 09:24   commons-logging-1.1.3.jar
   282269  10-31-14 13:19   httpcore-4.3.2.jar
    35058  01-19-15 09:24   jackson-annotations-2.3.0.jar
   229998  05-29-15 12:28   jackson-core-2.5.3.jar
   589289  01-19-15 09:24   joda-time-2.7.jar
   562858  05-18-15 09:42   aws-java-sdk-s3-1.9.34.jar
   590533  10-31-14 13:19   httpclient-4.3.5.jar
    44854  06-12-15 19:22   elasticsearch-cloud-aws-2.0.0-SNAPSHOT.jar
 --------                   -------
  6221815                   13 files
```

A lot of those files are already distributed with elasticsearch itself so classes are available within the classloader.

We mark all es core dependencies as provided in plugins.
We also remove `groupId` as already defined in parent pom.
And we remove non needed licenses files as some jars are not included anymore in plugins.

Closes #11647.
2015-07-01 21:37:27 +02:00
Martijn van Groningen 53874bf5a6 aliases: Parse aliases at search time and never cache parsed alias filters
The work around for resolving `now` doesn't need to be used for aliases, becuase alias filters are parsed at search time. However it can't be removed, because the percolator relies on it.

Parent/child can be specified again in alias filters, this now works again because alias filters are parsed at search time. Parent/child will also use the late query parse work around, to make sure to do the final preparations when the search context is around. This allows the aliases api to validate the parent/child queries without failing because there is no search context.

Closes #10485
2015-07-01 21:20:54 +02:00
Robert Muir 6b4c51f442 Merge pull request #11979 from rmuir/nosystem
Don't jarhell check system jars
2015-07-01 14:53:20 -04:00
Robert Muir 976ace21e0 let IDEs have jar hell in tests 2015-07-01 14:29:57 -04:00