Commit Graph

13850 Commits

Author SHA1 Message Date
Christoph Büscher f2573da77b Added null checks when adding inner queries 2015-06-23 11:45:00 +02:00
Christoph Büscher 6f8c0ce966 Query refactoring: OrQueryBuilder 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-06-22 22:03:57 +02:00
Christoph Büscher 33b3323a63 Merge pull request #11717 from cbuescher/feature/query-refactoring-fieldmaskingspan
Query refactoring: FieldMaskingSpanQueryBuilder and Parser
2015-06-22 20:07:31 +02:00
Christoph Büscher 570022e37b Merge pull request #11729 from cbuescher/feature/query-refactoring-fquery
Query refactoring: QueryFilterBuilder and Parser
2015-06-22 18:26:18 +02:00
Christoph Büscher b6cdc46a61 Query refactoring: QueryFilterBuilder and Parser
Moving the query building functionality from the parser to the builders
new toQuery() method analogous to other recent query refactorings. In
this case this also includes FQueryFilterParser, since both queries are
closely related.

Relates to #10217
Closes #11729
2015-06-22 18:17:01 +02:00
Christoph Büscher 107635b194 Query refactoring: FieldMaskingSpanQueryBuilder 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
Closes #11717
2015-06-22 17:03:32 +02:00
javanna fabe91633f Query refactoring: make QueryBuilder an interface again and rename current abstract class to AbstractQueryBuilder
It is handy to have a base interface, not just an abstract class, for all of our query builders. This gives us  more flexibility especialy with complex class hierarchies. For instance SpanTermQueryBuilder extends BaseTermQueryBuilder, but also needs to be marked as a SpanQueryBuilder. The latter is a marker interface that should extend QueryBuilder which is not possible unless QueryBuilder actually is an interface.

Also remove queryId method as it created confusion, getName is good enough for the purpose, and override the return type of toQuery method for SpanQueryBuilders to SpanQuery.

Closes #11796
2015-06-22 15:11:04 +02:00
Christoph Büscher 1a34d91641 Merge branch 'master' into feature/query-refactoring 2015-06-22 11:04:31 +02:00
Simon Willnauer af4b7ee000 Merge pull request #11795 from s1monw/abstract_runnable_ping
Use abstract runnable in scheduled ping
2015-06-22 10:27:19 +02:00
Simon Willnauer c7285d9d19 [TEST] Remove sleeps and latch timeouts from ClusterServiceTests
Tests relying on sleeps and latch timeouts are prone to weird timing issues
and hard to read / understand error messages. This commit moves towards a more
deterministic error model and replaces empty fails with real exceptions.
2015-06-22 09:51:51 +02:00
Simon Willnauer a45c05d907 Use abstract runnable in scheduled ping 2015-06-22 09:40:06 +02:00
Simon Willnauer 2e762f078d fix typo 2015-06-21 13:50:04 +02:00
Ryan Ernst 4c869cdf61 quite noisy test failure, related to #11769 2015-06-19 22:30:55 -07:00
Igor Motov 576b825d1c Improve logging of repository verification exceptions.
Some repository verification exceptions are currently only returned to the users but not logged on the nodes where the exceptions occurred, which makes troubleshooting difficult.

Closes #11760
2015-06-19 22:09:03 -04:00
Ryan Ernst aa4369f55b fix parent field mapper to copy customFieldDataSettings on merge 2015-06-19 16:48:34 -07:00
Ryan Ernst 0a5e763697 Removed hardcoded seed from test 2015-06-19 16:08:51 -07:00
Ryan Ernst de2dea04fb Rename MappedFieldType.validateCompatible to checkCompatibility 2015-06-19 15:59:30 -07:00
Ryan Ernst fa8a300f71 Merge pull request #11783 from rjernst/refactor/field-type-merge
Move merge simulation of fieldtype settings to fieldtype method
2015-06-19 15:45:01 -07:00
Ryan Ernst a71b128738 Address PR comments and fix customFieldDataSettings to still be copied
on merge
2015-06-19 15:41:36 -07:00
Ryan Ernst 434b1c94b3 Mappings: Move merge simulation of fieldtype settings to fieldtype method.
For #8871, we need to be able to check field types are compatible,
without comparing FieldMappers.  This change moves the simulation
checks (which generate merge conflicts) for any properties of
MappedFieldTypes into a new method, validateCompatible.

This also simplifies the merge code which merges settings
between the old and new fieldtypes. Previously, each subclass
of FieldMapper would have to set its own fieldtype settings.
However, now that we have .clone(), which perfectly copies
all properties (with subclasses accounted for), we can now
do a simple clone when merging.

Finally, this fixes a subtle bug in merging, in which if
merging has conflicts, and we were not simulating, we would
still update the field type, even though it was not compatible!

NOTE: there is one test failure I am trying to track down with
timestamp merging. Otherwise, all tests pass.
2015-06-19 13:42:16 -07:00
Areek Zillur a8c2886b3f Internal: Mark store as corrupted instead of deleting state file on engine failure
Currently, we delete the shard _state file on engine failure.
This behaviour does not persist the engine failure reason for later inspection.

This commit marks the shard store as corrupted instead of deleting
the _state file to ensure the store index can not be opened after and
the engine failure is persisted.
2015-06-19 14:46:26 -04:00
Clinton Gormley f67ae63d88 Docs: Added cluster naming advice to setup and getting started docs 2015-06-19 18:34:00 +02:00
Clinton Gormley e8d5b8ce4b Convert curl examples to Sense for snapshot restore
Closes #11537

Conflicts:
	docs/reference/modules/snapshots.asciidoc
2015-06-19 18:08:04 +02:00
Clinton Gormley 11330d1a34 Docs: Fixed URLs in the Groovy docs 2015-06-19 17:54:57 +02:00
Clinton Gormley 64581d66c9 Tidied up the update docs
Closes #9459
2015-06-19 17:29:11 +02:00
Alex Ksikes e26b1763e0 CommonTermsQuery fix for ignored coordination factor
CommonTermsQueryParser does not check for disable_coords, only for
disable_coord. Yet the builder only outputs disable_coords, leading to
disabling the coordination factor to be ignored in the Java API.

Closes #11730
Closes #11780
2015-06-19 10:15:37 -05:00
Ryan Ernst 04c3095f5e Merge pull request #11770 from rjernst/fix/null_value_merge
Hide more fieldType access and cleanup null_value merging
2015-06-19 08:15:33 -07:00
Clinton Gormley d6ba3226d6 Docs: Add missing quotes in phrase suggest 2015-06-19 16:56:25 +02:00
Zachary Tong 00cc16cc6a Merge pull request #11778 from polyfractal/bugfix/11487
Aggregations: moving_avg model parser should accept any numeric
2015-06-19 10:55:28 -04:00
Clinton Gormley cda1f37ead Merge pull request #11773 from elastic/robin13-patch-1
Update stats.asciidoc
2015-06-19 16:48:12 +02:00
Zachary Tong ae742c4a03 Aggregations: moving_avg model parser should accept any numeric, not just doubles
Also changes the models to throw ParseExceptions instead of SearchParseExceptions, so that
the validation can be unit-tested.

Fixes #11487
2015-06-19 10:36:15 -04:00
Clinton Gormley 1bfaac7098 Fixed bad asciidoc 2015-06-19 16:33:14 +02:00
Clinton Gormley dd680669f5 Docs: Rewrote the upgrade section 2015-06-19 16:28:07 +02:00
javanna 4db8c018f5 [TEST] null out NamedWriteableRegistry in BaseQueryTestCase 2015-06-19 13:41:25 +02:00
caldwecr 1ac728d22b Docs: Update filter-aggregation.asciidoc
Replace the previous example which leveraged a range filter, which causes unnecessary confusion about when to use a range filter to create a single bucket or a range aggregation with exactly one member in ranges.

Closes #11704
2015-06-19 12:24:42 +02:00
Iarwa1n ef8ee12259 Fix exception message in RestRequest
Closes #11305
2015-06-19 11:06:23 +01:00
javanna 7162c45ca7 Merge branch 'master' into feature/query-refactoring 2015-06-19 10:23:48 +02:00
javanna 88583a67de [TEST] remove @Repeat usages, manually run multiple iterations locally instead 2015-06-19 10:22:32 +02:00
oyiadom 6437478d65 [doc] Add missing imports for Java bulk API doc
I was unable to get my BulkProcessor script to work without importing the "ByteSizeUnit" and "ByteSizeValue" classes.  Perhaps I overlooked something in the example and do not understand its code.
2015-06-19 09:21:56 +02:00
Ryan Ernst caa40df328 Mappings: Hide more fieldType access and cleanup null_value merging
There were some missed uses of AbstractFieldMapper.fieldType in #11764.
This change also moves null_value merging into AbstractFieldMapper.
2015-06-18 15:58:30 -07:00
Ryan Ernst bfc4b8dd10 Merge pull request #11764 from rjernst/fix/field-type-ref
Replace fieldType access in mappers with getter
2015-06-18 13:01:07 -07:00
Ryan Ernst f09e0d7fb4 Mappings: Replace fieldType access in mappers with getter
A small refactoring to allow changing how the field type is stored later.
2015-06-18 11:47:38 -07:00
Shay Banon 341e980c52 [TEST] Use the correct renamed setting
and make the default value setting private
2015-06-18 20:40:07 +02:00
Simon Willnauer 1b2a3d0af6 Add @Repeat to forbidden APIs
@Repeat should not be committed just like @Seed.
Use -Pdev to run annotated methods.
2015-06-18 20:34:02 +02:00
Shay Banon 6d2ca116b9 [TEST] assertBusy on hasUnassigned
on fast machines, node leave might not move shards to unassigned right away, wait for it
2015-06-18 20:30:25 +02:00
Shay Banon 256f3d21ce Reset registeredNextDelaySetting on reroute
Need to reset the registered setting in order to make sure the nex round will capture the right delay interval

also randomize setting and name the setting properly

closes #11759
2015-06-18 20:20:49 +02:00
Jack Conradson 917aeb7278 Scripting: Allow executable expression scripts for aggregations
Added several classes to support expressions being used for numerical
calculations in aggregations.  Expressions will still not compile
when used with mapping and update script contexts.

Closes #11596
Closes #11689
2015-06-18 10:57:38 -07:00
Ryan Ernst 3fad16ac46 Merge pull request #11758 from rjernst/fix/empty-iterators
Add Iterators.emptyIterator to forbidden apis
2015-06-18 10:17:01 -07:00
Ryan Ernst 9157a11047 Build: Add Iterators.emptyIterator to forbidden apis
As a follow up to #11741, this forbids Iterators.emptyIterator in
favor the of builtin Collections.emptyIterator.
2015-06-18 10:12:58 -07:00
David Pilato 8c21a84b09 Merge pull request #11755 from dadoonet/azure/fix-tests-bytesize
[test] ByteSizeUnit.BYTES should be explicitly set
2015-06-18 18:25:59 +02:00