Commit Graph

15140 Commits

Author SHA1 Message Date
Ryan Ernst 57549a8133 Mappings: Validate parsed document does not have trailing garbage that is invalid json
This remerges PR #11414. The added validation for trailing garbage is
now only done when the parse method created the parser.
2015-08-11 10:42:18 -07:00
Ryan Ernst 80cca9e7ad Merge pull request #12779 from rjernst/fix/12753
Fix field type compatiblity check to work when only one previous type exists
2015-08-11 10:24:47 -07:00
Clinton Gormley 009fa64657 Revert "Disabling the license checker temporarily"
This reverts commit cdad9e698d.
2015-08-11 19:14:45 +02:00
Robert Muir 0f61f56b60 use spaces liberally in integration tests and fix space handling
Closes #12710
2015-08-11 18:03:41 +02:00
Jay Modi 8a8ac480dc Merge pull request #12802 from jaymode/additional_args
allow specifying additional arguments in startup-elasticsearch macrodef
2015-08-11 11:07:47 -04:00
Nik Everett e807499c29 Merge configured-plugin into jvm-example plugin 2015-08-11 07:36:32 -07:00
Adrien Grand abe3880dd9 Merge pull request #12274 from smflorentino/smflorentino-fix-winjvm-detect
Improve JVM Arch Detection
2015-08-11 16:17:26 +02:00
Adrien Grand 99f4f09b84 Merge pull request #12756 from keety/terms_query_disable_coord
Add support for `disable_coord` param to `terms` query
2015-08-11 16:13:58 +02:00
javanna a1be2d63f9 Query refactoring: better naming consistency for getters
In the query refactoring branch we've been introducing getter methods for every bit that you can set to each query. The naming is not every consistent at the moment. The applied naming convention are the following:

- `innerQuery()` for any inner query, when there's only one of them
- when there's more than one inner query, use a prefix that identifies which query it is, and the `query` suffix (e.g. `positiveQuery` or `littleQuery`)
- `fieldName()` for the name of the field to be queried
- `value()` for the actual query

These changes don't break bw comp given that these getters were all introduced with the query refactoring which hasn't been released yet. Also we are modifying getters that don't have a corresponding setter, as the fields are final, hence we are not breaking consistency between getter and setter.

Closes #12800
2015-08-11 15:55:18 +02:00
javanna ecc5516d32 add type safety for QueryParser
QueryParser now explicitly declares the type of QueryBuilder that it creates.

Closes #12773
2015-08-11 15:48:44 +02:00
jaymode 4da02073ce allow specifying additional arguments in startup-elasticsearch macrodef
Previously we had additional.args as a argument to the startup-elasticsearch macrodef and this was
being used to set some additional elasticsearch settings. This adds the ability to specify additional
arguments back using a element called additional-args.
2015-08-11 09:12:43 -04:00
Nik Everett 3c76e15aab Merge pull request #12785 from nik9000/remove_conf
Fix rpm -e removing /etc/elasticsearch
2015-08-11 05:08:07 -07:00
javanna d088d5a3b4 delete SimpleQueryStringParser.NAME constant
Previously restored this constant due to a bad merge, fixed now
2015-08-11 13:45:28 +02:00
javanna e2181990c4 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java
2015-08-11 13:24:17 +02:00
Simon Willnauer 76564bbe6a TearDown secondary node after tests 2015-08-11 13:08:32 +02:00
Simon Willnauer a8580d11f5 Improve arg handling in ant script
This commit is a spinn-off from #12710 which improves the handling of process
arguments ot play nice with spaces etc.
2015-08-11 13:08:32 +02:00
Simon Willnauer 9c6ed8c238 Merge pull request #12260 from s1monw/issues/12239
Include stacktrace in rendered exceptions
2015-08-11 12:55:33 +02:00
javanna db7219901d simple query string: remove (not working) support for alternate formats
Removed attempt of parsing of `field` rather than `fields` and attempted support of the following syntax:

```
{
  "simple_query_string": {
    "body" : {
      "query": "foo bar"
    }
  }
}
```

Both these two syntaxes were undocumented, untested and not working.

Added test for case when `fields` is not specified, then the default field is queried.

Closes #12794
Closes #12798
2015-08-11 12:54:26 +02:00
Simon Willnauer a172c50a5e Merge pull request #12797 from s1monw/multi_node_IT
Add multi-node IT infrastructure
2015-08-11 12:37:47 +02:00
Christoph Büscher 6071db89ea Fix BaseQueryTestCase after merge with master 2015-08-11 12:19:39 +02:00
Simon Willnauer b3b04e05f5 add multinode to pom.xml 2015-08-11 12:15:35 +02:00
Simon Willnauer ca20282e84 Include stacktrace in rendered exceptions
This commit includes the stacktrace into the structured exception rendering
to ensure we can find the reason / cause for certain things quicker. This
is enabled by default and is very verbose. Users can disable it via `rest.exception.stacktrace.skip = true|false`

Closes #12239
2015-08-11 11:55:59 +02:00
Simon Willnauer d1bc099c91 Add multi-node IT infrastructure
This adds the infrastrucutre to run integration tests with more than one node.
 * it adds relevant macros and targets to integration-tests.xml to start unicast nodes
 * there is a qa/smoke-test-multinode project that simulates such a setup

this commit is soely the infrastructure and doesn't hook up any projects to use this.
For reliability and stability reasons this should be used with care and only if it's really
needed.

Closes #12718
2015-08-11 11:36:15 +02:00
Christoph Büscher 097511601c Merge branch 'master' into feature/query-refactoring 2015-08-11 11:33:03 +02:00
Simon Willnauer 03e15056c7 Merge pull request #12796 from s1monw/invert_add_settings_order
Apply additional plugin settings only if settings are not explicit
2015-08-11 10:34:55 +02:00
Simon Willnauer f9487f7451 Apply additional plugin settings only if settings are not explicit
We have a way to allow a plugin to specify additional settings. These
settings should only be applied if they are not already existing in the
node settings.
2015-08-11 10:06:55 +02:00
Ryan Ernst f4827e55e3 Test: More attempts at forcing netty test to always use netty 2015-08-11 00:43:29 -07:00
Ryan Ernst b81f5f6142 Revert "Merge pull request #11414 from rjernst/fix/2315"
This reverts commit 937732b17d, reversing
changes made to 6fea6c542c.
2015-08-10 23:13:19 -07:00
Ryan Ernst 937732b17d Merge pull request #11414 from rjernst/fix/2315
Validate parsed document does not have trailing garbage that is invalid json
2015-08-10 21:58:33 -07:00
Ryan Ernst 8a587ead89 Mappings: Validate parsed document does not have trailing garbage that is invalid json
See #2315
2015-08-10 21:57:14 -07:00
Ryan Ernst 6fea6c542c Test: Fix netty integ test to ensure local mode is not used.
closes #12788
2015-08-10 20:57:55 -07:00
Igor Motov 3354a816fc Changes in unassigned info and version might not be transferred as part of cluster state diffs
The equalTo logic of ShardRouting doesn't take version and unassignedInfo into the account when compares shard routings.  Since cluster state diff relies on equal to detect the changes that needs to be sent to other cluster, this omission might lead to changes not being properly propagated to other nodes in the cluster.

Closes #12387
2015-08-10 19:58:36 -04:00
Ryan Ernst 1b3cd504a5 test: quiet netty integ test 2015-08-10 16:57:02 -07:00
Nik Everett dfb6d4d08f QA: Create a test plugin with configuration
In order to test the way plugins with configuration are installed and removed
we need a plugin with configuration in the repository. The simplest way to
get one is to make an "example" plugin.

In the process of making this example it became aparent that cat actions were
difficult to create outside of the org.elasticsearch.rest.action.cat package
because key methods in AbstractCatAction were package private. This makes them
protected and uses them to create the example configured plugin.

Relates to #12717 but is only one step of many to close it.
2015-08-10 14:51:49 -07:00
Nik Everett 7223f7c75a Packaging: fix rpm -e removing /etc/elasticsearch
When we fixed rpm creating the /etc/elasticsearch/scripts directory we
broke removing the rpm - it lef the /etc/elasticsearch directory behind.
This fixes that.
2015-08-10 14:32:41 -07:00
Ryan Ernst bbf42d379d Merge pull request #12744 from rjernst/hellspawn
Remove Settings.getAsClass
2015-08-10 14:06:50 -07:00
Ryan Ernst 40f119d85a This method on settings loaded a class, based on a setting value, using
the default classloader. It had all kinds of leniency in how the
classname was found, and simply cannot work with plugins having isolated
classloaders.

This change removes that method. Some of the uses of it were for custom
extension points, like custom repository or discovery types. A lot were
just there to plugin mock implementations for tests. For the settings
that were legitimate, all now support plugins adding the given setting
via onModule. For those that were specific to tests for mocks, they now
use Classes.loadClass (a helper around Class.forName). This is a
temporary measure until (in a future PR) tests can change the
implementation via package private statics.

I also removed a number of unnecessary intermediate modules, added a
"jvm-example" plugin that can be filled in in the future as a smoke test
for breaking plugins, and gave some documentation to "spawn" modules
interface.

closes #12643
closes #12656
2015-08-10 14:04:45 -07:00
Nik Everett b6f2cebf8b Vagrant tests: set prompts to be more consistent
Also a small amount of cleanup in the way we create VMs - just a bit less
repetition.

Prompts are always of the form "box:cwd$ ". Even for root. Which is ok because
you don't have to be that careful with root because these are VMs that you
can destroy and recreate quickly.
2015-08-10 13:49:54 -07:00
Scott Florentino e7aa2a1fb2 Closing #12256 Update service.bat with a safer RAM value 2015-08-10 13:22:29 -07:00
Ryan Ernst b47f5976a5 Mappings: Fix field type compatiblity check to work when only one previous type exists.
This was a straight up bug found in #12753. If only one type existed,
the compatibility check for a new type was not strict, so changes to
an updateable setting like search_analyzer got through (but only
partially). This change fixes the check and adds tests (which were
previously a TODO).

This also fixes a bug in dynamic field creation which woudln't copy
fielddata settings when duplicating a pre-existing field with the
same name.

closes #12753
2015-08-10 12:41:36 -07:00
Christoph Büscher fcad98c142 Use Locale.ROOT in Fuzziness class to toUpperCase() 2015-08-10 18:02:27 +02:00
Alex Ksikes 626b1abde4 Refactoring of FuzzyQuery
Relates to #10217

This PR is against the query-refactoring branch.

Closes #11865
2015-08-10 17:23:59 +02:00
Simon Willnauer 13a347239a Don't run shaded tests as unit tests
If we run the tests as a reactor build we reference the dependencies
before they are shaded. This causes problems since we verify that unshaded versions
of a transitive dependency is not present. This commit moves the verification tests
into the integration test that always runs with the shaded version of the jar.
2015-08-10 16:29:19 +02:00
Colin Goodheart-Smithe 6abc69c488 Packaging: Makes sure all POMs contain a description
Adds an explicit description the RPM package so it doesn't inherit the description from the POM.

Closes #12550

Also, modified descriptions for deb and rpm packages to be the same and to reference the documentation rather than listing features that are out of date.
2015-08-10 15:21:24 +01:00
Christoph Büscher 0d55bfd481 Removing @AwaitsFix in PluginMangerIT after merging in fix from master 2015-08-10 15:58:19 +02:00
Christoph Büscher d90552e2fb Merge branch 'master' into feature/query-refactoring 2015-08-10 15:56:42 +02:00
Luca Cavanna dfae80f3b9 Merge pull request #12770 from javanna/docs/migrate_query_shard_context
[DOCS] updated migrate guide with info for plugins
2015-08-10 15:53:29 +02:00
javanna a1151e63fb [DOCS] updated migrate guide with info for plugins 2015-08-10 15:53:01 +02:00
Christoph Büscher 5ecf3e5f72 Merge pull request #12731 from cbuescher/feature/query-refactoring-isFilterCleanup
Move flag to track filter context to QueryShardContext
2015-08-10 15:37:22 +02:00
Christoph Büscher a269b96799 Merge pull request #12581 from cbuescher/fix/12531
Fix setting timezone on default DateTime formatter
2015-08-10 15:05:39 +02:00