Commit Graph

13942 Commits

Author SHA1 Message Date
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
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
Robert Muir 41ac191cac Add java.home to debug logging 2015-07-01 14:06:53 -04:00
Robert Muir 30f267f758 Don't jarhell check system jars 2015-07-01 13:26:00 -04:00
Martijn van Groningen 5a2a2861ab Merge pull request #11954 from martijnvg/percolator/stats/typo
Change `percolator.getTime` -> `percolator.time`
2015-07-01 19:08:42 +02:00
Ryan Ernst 41dc1b0120 Mappings: Move short name access out of field type
Eventually, the field type should not need any names, because there
will be only one name which leads to finding it (the full name, which is
also the index name). However, the short or "simple" name (using java
terminology for class names) is needed just in a couple places, for
serialization.

This change moves the simple name out of MappedFieldType.Names, into
Mapper, and makes Mapper and FieldMapper abstract classes.
2015-07-01 09:46:52 -07:00
Ryan Ernst ac8896c10e Merge pull request #11962 from rjernst/pr/root-mappers-rename
Rename "root" mappers to "metadata" mappers
2015-07-01 09:13:14 -07:00
Robert Muir b55a3f32b8 Add debug logging in case classpath is crazy 2015-07-01 10:04:36 -04:00
Simon Willnauer 93acb98bd6 Carry on rest status if exceptions are not serializable
Today we loose the RestStatus code for non-serializable exceptions.
This can be tricky if they are supposed to signal certain situations
like authentication errors etc. This commit adds support for carrying on
the exceptions in the NotSerializableExceptoinWrapper
2015-07-01 13:57:54 +02:00
Martijn van Groningen 74cf05595e docs: Fix field stats docs. 2015-07-01 12:05:26 +02:00
Colin Goodheart-Smithe e366d0380d Aggregations: Adds other bucket to filters aggregation
The filters aggregation now has an option to add an 'other' bucket which will, when turned on, contain all documents which do not match any of the defined filters. There is also an option to change the name of the 'other' bucket from the default of '_other_'

Closes #11289
2015-07-01 10:44:04 +01:00
Colin Goodheart-Smithe ab80130c10 Aggregations: Makes SKIP Gap Policy work correctly for Bucket Script aggregation
This change means that when the skip gap policy is used, the bucket script aggregation will skip executing the script on a bucket if any of the required bucket_paths are missing for the bucket. No aggregation will be added to the bucket, and the aggregation will move to the next bucket.
2015-07-01 10:18:18 +01:00
Tanguy Leroux 737440b580 Postrm script should not fail
This commit changes the postrm script so that it prints error messages instead of failing & exiting when the deletion of a directory failed while removing a RPM/DEB package.

Closes #11373
2015-07-01 11:03:38 +02:00
caldwecr 8f1907f761 Docs: Use consistent plural form of index
Indices or indexes; but please not a hodgepodge of both.

Closes #11966
2015-07-01 10:51:43 +02:00
William Li 2be3fe31a4 Docs: Update filter-aggregation.asciidoc
Closes #11782
2015-07-01 10:17:45 +02:00
Colin Goodheart-Smithe d73ce3492a Aggregations: Makes ValueFormat and ValueFormatter never null
This allows a lot of null checks to be removed where we were always falling back to the ValueFormat.RAW anyway. Now the format is set to ValueFormat.RAW when no alternative is suitable.

Closes #10594
2015-07-01 08:57:03 +01:00
Ruslan Boyarskiy e5e422b880 Docs: Update post-filter.asciidoc
Removing useless comma

Closes #11912
2015-07-01 09:32:39 +02:00
szroland 68d658a30f Recovery: Fix wrong reused file bytes in Recovery API reports
Simple snapshot.restore test case that also exposes the bug mentioned in #11876

Fix #11876
Closes #11965
2015-07-01 09:08:53 +02:00
Martijn van Groningen ef9d70b9b3 field stats: added index constraints
Field stats index constraints allows to omit all field stats for indices that don't match with the constraint. An index
constraint can exclude indices' field stats based on the `min_value` and `max_value` statistic. This option is only
useful if the `level` option is set to `indices`.

For example index constraints can be useful to find out the min and max value of a particular property of your data in
a time based scenario. The following request only returns field stats for the `answer_count` property for indices
holding questions created in the year 2014:

curl -XPOST 'http://localhost:9200/_field_stats?level=indices' -d '{
   "fields" : ["answer_count"] <1>
   "index_constraints" : { <2>
      "creation_date" : { <3>
         "min_value" : { <4>
            "gte" : "2014-01-01T00:00:00.000Z",
         },
         "max_value" : {
            "lt" : "2015-01-01T00:00:00.000Z"
         }
      }
   }
}'

Closes #11187
2015-07-01 08:47:03 +02:00
Boaz Leskes 3cf78669f2 Mute testInstallPluginWithElasticsearchDownloadService & testInstallPluginWithMavenCentral
Example failure: http://build-us-00.elastic.co/job/es_core_master_oracle_6/519/testReport/
2015-07-01 08:34:47 +02:00
Robert Muir 5294b1ae40 Merge pull request #11963 from rmuir/prevent_hell
detect jar hell before installing a plugin
2015-07-01 00:00:12 -04:00
Robert Muir f312a4e30d cleanup uwe's unzip code 2015-06-30 23:59:45 -04:00
Igor Motov 2a9f26dfdc Improve repository verification failure message
Closes #11922
2015-06-30 20:08:15 -04:00
Simon Willnauer 04631d6948 Carry on headers if unknow exception is a WithRestHeadersException 2015-06-30 23:02:45 +02:00
Simon Willnauer c6837f56d9 Serialize AlreadyClosedException first before it's superclass 2015-06-30 23:02:45 +02:00
Robert Muir a839644826 detect jar hell before installing a plugin 2015-06-30 16:42:01 -04:00
Ryan Ernst 4b3dba527b Mappings: Rename "root" mappers to "metadata" mappers
"Root" is a very confusing term for meta field mappers. This change
renames "RootMapper" to "MetadataFieldMapper" and simplifies
how metadata mappers are setup.

It also requires that metadata mappers are now a FieldMapper
(MetadataFieldMapper extends from AbstractFieldMapper). The only
use of a root mapper that wasn't a field mapper was the theoretical
"external" root mapper (just a test mapper). But it doesn't make
sense to not have an actual field, and this falls inline with
the hopefully eventual collapsing of AbstractFieldMapper/FieldMapper/Mapper.
2015-06-30 13:31:17 -07:00
Boaz Leskes 182c59f5b4 Discovery: reroute after node join is processed
- shard listing actions underpinning shard allocation do not have access to that new node yet (causing errors during shard allocation see #11923
 - the very first cluster state published to a node already has shard assignments to it. This surfaced other issues we are working to fix separately

 This commit changes the reroute to be done post processing the initial join cluster state to side step these issues while we work on a longer term solution.

Closes #11960
2015-06-30 22:09:29 +02:00
Michael McCandless 48b85421ec fix smoke_test_plugins.py: install the .zip under releases, not the .jar 2015-06-30 15:03:54 -04:00
Simon Willnauer dab2a76eae Cut over to writeable for TransportAddress
This will allow us to move away from reflection hacks to serialize
transport exceptions.
2015-06-30 20:59:47 +02:00
Michael McCandless 46e35e5576 Merge pull request #11957 from mikemccand/smoke_test_plugins
Add simple plugins smoke tester

Closes #11935
2015-06-30 14:34:24 -04:00
Michael McCandless 189ef91e3c first cut 2015-06-30 14:14:45 -04:00