Commit Graph

2526 Commits

Author SHA1 Message Date
Jason Tedor ab45d69b16 Remove unused import in o.e.c.l.Releasables 2015-12-02 16:29:04 -05:00
Areek Zillur 3d8c32008e [TEST] geo completions work with geo point fields 2015-12-02 13:01:33 -05:00
Jason Tedor 199a05311e Remove unchecked warnings rendered unnecessary 2015-12-02 10:55:25 -05:00
Jason Tedor 05430a788a Remove and forbid use of the type-unsafe empty Collections fields
This commit removes and now forbids all uses of the type-unsafe empty
Collections fields Collections#EMPTY_LIST, Collections#EMPTY_MAP, and
Collections#EMPTY_SET. The type-safe methods Collections#emptyList,
Collections#emptyMap, and Collections#emptySet should be used instead.
2015-12-02 10:41:59 -05:00
Adrien Grand 79188ed38d Treat mappings at an index-level feature.
Today we try to have type-level granularity when dealing with mappings. This
does not play well with the cross-type validations that we are adding. For
instance we prevent the `_parent` field to point to an existing type. This
validation would be skipped today in the case of dedicated master nodes, since
those master nodes would only create the type that is being updated when
updating a mapping.
2015-12-02 16:32:12 +01:00
Robert Muir b7f497627f Merge pull request #15172 from rmuir/nuke_unused_deps
remove unused core dependencies
2015-12-02 07:20:11 -05:00
Martijn van Groningen ec74586680 metadata: If an alias and index share the same name then a descriptive error should be thrown
In 1.x it is possible via index templates to create an index with an alias with the same name as the index. The index name must match the index template and have an alias with the same name as the index being created.
2015-12-02 12:23:51 +01:00
Ryan Ernst d68c6673a2 Build: Cleanup precommit task gradle code
This change attempts to simplify the gradle tasks for precommit. One
major part of that is using a "less groovy style", as well as being more
consistent about how tasks are created and where they are configured. It
also allows the things creating the tasks to set up inter task
dependencies, instead of assuming them (ie decoupling from tasks
eleswhere in the build).
2015-12-01 22:36:54 -08:00
Robert Muir ef7258413f improve exception and remove complex test, such indexes will not be loaded into a closed state.
we will not load them at all.
2015-12-01 23:03:54 -05:00
Robert Muir 6e5c301739 remove unused dependencies 2015-12-01 22:22:11 -05:00
Jason Tedor e52faa81cc Fix typo in field name in MetaDataMappingService 2015-12-01 13:16:28 -05:00
Adrien Grand 304695e7ee Don't treat _default_ as a regular type.
This adds safety that you can't index into the `_default_` type (it was possible
before), and can't add default mappers to the field type lookups (was not
happening in tests but I think this is still a good check).

Also MapperService.types() now excludes `_default` so that eg. the `ids` query
does not try to search on this type anymore.
2015-12-01 18:03:11 +01:00
Adrien Grand 77095a3e97 Merge pull request #15144 from jpountz/fix/ignored_merge_failure
Mappings: Don't ignore merge failures.
2015-12-01 16:37:32 +01:00
Christoph Büscher 6f2c36dcb7 Merge pull request #15113 from cbuescher/highligh-builder-refactoring
Make HighlighterBuilder implement Writable, equals and hashCode
2015-12-01 15:28:33 +01:00
Christoph Büscher 027a9b1844 Refactor HighlighterBuilder
This change pulls out the common fields that HighlighterBuilder shares with
its nested Field class into a new abstract CommonHighlighterOptions superclass
which also gets equals() and hashCode() method and methods to serialize the
common fields to a StreamOutput and read them from a stream.

Relates to #15044
2015-12-01 15:17:09 +01:00
javanna c67a332486 Query DSL: Enforce distance is greater than 0 in geo distance query
Validation is not done as part of the distance setter method and tested in GeoDistanceQueryBuilderTests. Fixed GeoDistanceTests to adapt to the new validation.

Closes #15135
2015-12-01 14:07:32 +01:00
Jason Tedor 13dbed9c92 Add each mapping at most once on batch mapping updates
When creating an index on master for the purpose of updating mappings, a
mapping being updated could needlessly be merged multiple times. This
commit ensures that each mapping is merged at most once while preparing
to update mappings.
2015-12-01 07:52:32 -05:00
Jason Tedor 09006ace11 Add the default mapping at most once on batch mapping updates
When creating an index on master for the purpose of updating mappings,
the default mapping could needlessly be added multiple times. This
commit ensures that the default mapping is added at most once while
preparing to update mappings.
2015-12-01 07:52:32 -05:00
Jason Tedor eea72a6d86 Preserve existing mappings on batch mapping updates
This commit addresses an issues introduced in #14899 to apply mapping
updates in batches. The issue is that an existing mapping for a type
could be lost if that type came in a batch that already contained a
mapping update for another type on the same index. The underlying issue
was that the existing mapping would not be merged in because the merging
logic was only tripped once per index, rather than for all types seeing
updates for each index. Resolving this issue is simply a matter of
ensuring that all existing types seeing updates are merged in.

Closes #15129
2015-12-01 07:52:32 -05:00
David Pilato fb79d064d7 Merge remote-tracking branch 'origin/master' 2015-12-01 12:46:09 +01:00
Adrien Grand cebd7bdd7f Mappings: Don't ignore merge failures. 2015-12-01 12:22:07 +01:00
javanna d17d629422 [TEST] stabilize SimpleSearchIT.testQueryNumericFieldWithRegex
Provide mappings explicitly instead of relying on dynamic mapping, also add missing ensureGreen.

Closes #15105
2015-12-01 12:13:06 +01:00
David Pilato 854099f1d5 Reject refresh usage in bulk items when using and fix NPE when no source
The REST bulk API rejects use of `refresh` at the item level. But the Java API lets the user setting it.

We need to have the same behavior and don't let think the user he can define `refresh` per bulk item.

Note that the user can still define `refresh` on the bulk itself.

Also a user can create with Java API an IndexRequest without any source which is causing a NPE when evaluating the bulk item size.

Closes #7361.
Closes #15120.
2015-12-01 12:00:30 +01:00
Yannick Welsch 059a675aa5 [TEST] mark test as awaitsfix: RareClusterStateIT.testDeleteCreateInOneBulk() 2015-12-01 11:41:51 +01:00
Britta Weber e2f87b0c52 multi field names may not contain dots
related to #14957
2015-12-01 11:27:26 +01:00
Boaz Leskes e256c6fdd1 AwaitsFix testDynamicUpdates
pending on https://github.com/elastic/elasticsearch/issues/15129
2015-12-01 09:57:22 +01:00
Robert Muir 44f21b24d7 Fix unit tests to bind to port 0.
I will followup with ITs and other modules. By fixing this, these tests become more reliable (will never sporatically
fail due to other stuff on your machine: ports are assigned by the OS), and it allows us to move forward with
gradle parallel builds, in my tests this is a nice speedup, but we can't do it until tests are cleaned up
2015-11-30 17:22:58 -05:00
Jason Tedor fba74c9615 Add docs for cluster state update task batching 2015-11-30 08:59:24 -05:00
Jason Tedor ffb3e0a845 ClusterStateTaskListener#onNoLongerMaster now throws NotMasterException 2015-11-30 08:59:24 -05:00
Jason Tedor 72e18ec681 Add builder to create cluster state executor results 2015-11-30 08:59:24 -05:00
Jason Tedor 9aa9447016 Simplify loop in InternalClusterService#runTasksForExecutor 2015-11-30 08:59:23 -05:00
Jason Tedor 7caee2fa4d Explicitly correspond cluster state tasks and execution results 2015-11-30 08:59:23 -05:00
Jason Tedor c3f97e7642 Simplify InternalClusterService#submitStateUpdateTask with lambdas 2015-11-30 08:59:23 -05:00
Jason Tedor 1fb6a1f669 Simplify grouping of cluster state update tasks 2015-11-30 08:59:23 -05:00
Jason Tedor eaba3d5cb3 Add test for cluster state batch updates 2015-11-30 08:59:23 -05:00
Boaz Leskes f0f89e708d Split cluster state update tasks into roles
This commit splits cluster state update tasks into roles. Those roles
are:
 - task info
 - task configuration
 - task executor
 - task listener

All tasks that have the same executor will be executed in batches. This
removes the need for local batching as was previously in
MetaDataMappingService.

Additionally, this commit reintroduces batching on mapping update calls.

Relates #13627
2015-11-30 08:59:23 -05:00
Christoph Büscher a0fe93fa67 Tests: Correction in AbstractShapeBuilderTestCase
Removed check that two shapes that are different according
to equals() have different hashCode since that is not required
by the contract of hashCode.
2015-11-30 11:09:41 +01:00
Jim Ferenczi e182072b6f Merge pull request #15017 from jimferenczi/fields_option
Refuse to load fields from _source when using the `fields` option and support wildcards.
2015-11-30 11:01:21 +01:00
Jim Ferenczi 731833cfc6 Fixes #14489
Do not to load fields from _source when using the `fields` option.
  Non stored (non existing) fields are ignored by the fields visitor when using the `fields` option.

Fixes #10783
  Support * wildcard to retrieve stored fields when using the `fields` option.
  Supported pattern styles are "xxx*", "*xxx", "*xxx*" and "xxx*yyy".
2015-11-30 11:00:32 +01:00
Robert Muir b7523bb974 Add workaround for JDK-6427854
See e.g. http://build-us-00.elastic.co/job/es_feature_ingest/2831/consoleFull

The bug can still happen, so we should let netty do this workaround
2015-11-29 16:12:52 -05:00
Michael McCandless 94954ece3a improve javadocs 2015-11-29 06:13:47 -05:00
Michael McCandless 8933947b95 only pull Fields once from the reader 2015-11-29 06:00:11 -05:00
Robert Muir 29853744a3 Merge pull request #15055 from rmuir/fun_with_windows
set ActiveProcessLimit=1 on windows
2015-11-27 16:57:34 -05:00
Christoph Büscher b375084305 Tests: Correction in AbstractQueryTestCase
Removed check that two query builder that are different according
to equals() have different hashCode since that is not required
by the contract of hashCode.
2015-11-27 17:36:57 +01:00
Daniel Mitterdorfer 2f87e0a4d9 Declare NetworkService non-final to support mocking in tests 2015-11-27 15:51:19 +01:00
Robert Muir ee827198ff set ActiveProcessLimit=1 on windows
This blocks process creation, similar to the approach for BSD.
2015-11-27 01:50:09 -05:00
Robert Muir aa56bfa562 Merge pull request #15039 from rmuir/setrlimit
set RLIMIT_NPROC = 0 on bsd/os X systems.
2015-11-26 21:18:57 -05:00
Jason Tedor 5c5e02e0bf Remove outdated comment and cleanup RestVerifyRepositoryAction 2015-11-26 19:11:11 -05:00
Simon Willnauer e363e0c2aa Merge pull request #15012 from s1monw/issues/14866
Prevent writing to closed channel if translog is already closed
2015-11-26 14:47:38 +01:00
Simon Willnauer 59be738e40 Merge pull request #15035 from s1monw/simplify_monitoring_service
Simplify MonitorService construction and detach from guice
2015-11-26 14:05:32 +01:00