1715 Commits

Author SHA1 Message Date
Jason Tedor
b1965267ec Fix broken test in BootstrapCliParserTests 2015-09-23 10:37:55 -04:00
Jason Tedor
8d1d8f9c46 Merge pull request #13737 from jasontedor/cli-parameter-order-error-message
More helpful error message on parameter order
2015-09-23 10:14:13 -04:00
Jason Tedor
9e7c56b430 More helpful error message on parameter order
This commit addresses a confusing error message that arises when a
property parameter (e.g. -D) is after a double-dash parameter. The
current error message reports to the user that the parameter does not
start with “--". Adding the second dash as the error message suggests
causes the parameter to be silently ignored. This is confusing for the
user. With this commit, the user is now informed that the parameter
order is violated.

Relates e27ede48ce6f275f80e8b59bc6dc7ad2849c64fc
2015-09-23 10:13:40 -04:00
Nicholas Knize
8fe9a11943 Fix GeoPointFieldMapper to index geohash at correct precision(s). Add test coverage. 2015-09-23 09:07:52 -05:00
Colin Goodheart-Smithe
083f28a704 remove index from QueryParseContext Constructor 2015-09-23 15:07:33 +01:00
Simon Willnauer
a63a30bcc4 Remove ExpressionScriptCompilationException and ExpressionScriptExecutionException
These exceptions are useless and unused, since we are on a major verison we should remove
them. This commit also makes it easier to remove excepitons in the future.
2015-09-23 15:09:30 +02:00
Simon Willnauer
67a911ff24 [TEST] force REQUEST durabilty otherwise test will fail 2015-09-23 14:10:40 +02:00
Simon Willnauer
c32b9c3846 Add back presumably redundant shouldFlush() check.
The check prevents a race condition since we can't use real locks here.
Relates to #13707
2015-09-23 13:57:12 +02:00
Boaz Leskes
d62f864317 Reduced the number of ClusterStateUpdateTask variants
In the past ClusterStateUpdateTask was an interface and we had various derived marker interfaces to control behavior. Since then we moved ClusterStateUpdateTask to be an abstract class but we kept the old hierarchy of implementations. All of those (but the AckedClusterStateUpdateTask) can be folded into ClusterStateUpdateTask, adding correct default behavior.

Closes #13735
2015-09-23 13:43:20 +02:00
Robert Muir
d6c1880f08 Merge pull request #13726 from rmuir/lang-expression
Factor expressions scripts out to lang-expression plugin
2015-09-23 07:32:15 -04:00
Clinton Gormley
e27ede48ce Added a clarifying note about argument order in the bin/elasticsearch start script 2015-09-23 13:17:57 +02:00
Simon Willnauer
75e816400c Remove TranslogService and fold it into synchronous IndexShard API
This commit moves the size and ops based flush into a synchronous API into
IndexShard and removes the time-based flush alltogether since it' basically
covered by the inactive async flush API we have today. The functionality doesn't
need to be covered by scheduled task and async APIs while we can actually make all
the decisions in a sync manner which is way easier to control and to test.

Closes #13707
2015-09-23 12:39:06 +02:00
Simon Willnauer
6c335f4a47 Parse source, extra-source and template-source on the coordinating node
This commit removes all the opaque bytes for extra_source and template_source.
Instead source and extra_source etc. are represented as SearchSourceBuilder which can
in-place be modified and is updated with the content of the request parameters.
Template Source is parsed and evaluated which in-turn replaces the actual source.
2015-09-23 12:24:07 +02:00
Colin Goodheart-Smithe
ac8c1722ac fix compile errors 2015-09-23 11:07:20 +01:00
Colin Goodheart-Smithe
b98f7cf023 updates to fix some of the NOCOMMITs 2015-09-23 10:44:24 +01:00
Colin Goodheart-Smithe
ab01ec5b28 SearchRequest.source() now returns a SearchSourceBuilder.
Lots of NOCOMMITS are in the code as lots of compile errors have been temporarily commented out
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
41e63505b9 muted failing test 2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
aa3d29dfbc small parsing fix for fields 2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
b4dd6a5429 fixes to tests 2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
3cb3514474 clean up for methods in SearchRequestBuilder so it works with SearchSourceBuilder 2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
e1759b1a60 cleanup codebase to work with SearchSourceBuilder 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
9116c1c19f Renamed SearchSourceBuilder to OldSearchSourceBuilder and NewSearchSourceBuilder to SearchSourceBuilder 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
3c8c6c0250 Completed serialisation to/from son and transport protocol and added a unit test 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
eed6ab7b82 various fixes after a review 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
e73052bce2 cleanup of commented out code 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
5623dd2950 implemented hashCode, equals and fromXContent in NewSearchSourceBuidler 2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
a96f14ecc6 new SearchSourceBuilder to use as the search request 2015-09-23 10:44:22 +01:00
javanna
7eedd84dc3 Query refactoring: refactor query_string query and score functions
Refactor the function_score query so it can be parsed on the coordinating node, split parse into fromXContent and toQuery, make FunctionScoreQueryBuilder Writeable.

Closes #13653
2015-09-23 11:32:54 +02:00
javanna
6350470ee3 Remove index member from QueryParseContext
Given that we are moving to parsing queries on the coordinating node, the index name is not relevant anymore in QueryParseContext, as the parsing phase cannot be related to any specific index. On the contrary, the QueryShardContext is the one that holds mappings etc. and the index name too, as the lucene query creation happens on the data node and can still be related with the index that it happens against.

Changes are mainly around tests that were expecting the index name, moved to using QueryShardException in some of them, removed the index name elsewhere.

Closes #13631
2015-09-23 10:30:53 +02:00
Michael McCandless
4fb6386df3 Merge pull request #13718 from mikemccand/catch_throwable
LoggingRunnable.run should catch and log all errors, not just Exception
2015-09-23 04:24:27 -04:00
Ryan Ernst
cfb1e6c6c2 Refactor file script tests to be real unit tests 2015-09-22 23:39:22 -07:00
Ryan Ernst
05957cc4f3 rewrite custom scriptcontext tests to be unit tests 2015-09-22 21:16:10 -07:00
Robert Muir
b65a631d9b i am fucking done taking out your trash: have it back, clean it up yourself. just let me secure the system. 2015-09-22 23:50:28 -04:00
Robert Muir
689af1a6d6 Factor expressions scripts out to lang-expression plugin 2015-09-22 20:33:47 -04:00
Nik Everett
e284210652 [core] Forbid ForwardingSet
Removes CopyOnWriteHashSet, our only usage of ForwardingSet. We weren't
using it.

Related to #13224
2015-09-22 12:31:08 -04:00
Michael McCandless
de8eadab93 catch Throwable instead of Exception in LoggingRunnable.run 2015-09-22 11:36:16 -04:00
Chris Earle
6d3202b6b5 Remove unnecessary suppression 2015-09-22 10:41:50 -04:00
Chris Earle
764051b4e3 Moving system property setting to before it can be used 2015-09-22 10:41:50 -04:00
Christoph Büscher
5ebb074e57 Fixing warnings and errors in javadoc 2015-09-22 13:59:34 +02:00
Christoph Büscher
1aae68d2e8 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/QueryParseContext.java
	core/src/main/java/org/elasticsearch/index/query/QueryParser.java
2015-09-22 12:43:55 +02:00
Christoph Büscher
7d887a1e05 Tests: fix failing GeoDistanceRangeQueryTest 2015-09-22 12:13:53 +02:00
Britta Weber
997ea08e7b remove tests. they are fragile, hard to debug and add no value
closes #13542
closes #13343
closes #13316
2015-09-22 11:42:24 +02:00
Christoph Büscher
03035a28a3 Query Refactoring: moving validation to setters and constructors
Moving validation from validate() to constructors and setters for the
following query builders:

* GeoDistanceQueryBuilder
* GeoDistanceRangeQueryBuilder
* GeoPolygonQueryBuilder
* GeoShapeQueryBuilder
* GeohashCellQuery
* TermsQueryBuilder

Relates to #10217
2015-09-22 11:05:56 +02:00
Simon Willnauer
ac2be641b3 add missing license header 2015-09-22 10:03:19 +02:00
Simon Willnauer
2c9a280878 only set matcher if parser is not null 2015-09-22 09:34:00 +02:00
Simon Willnauer
5f258b1585 Add a ObjectParser helper for stream parsing
This parser prototype allows to decleratively define parsers for XContent
instead of writing messy and error prone while loops. It encapsulates all the error handling logic
and only even tries to parse if the token types match the declaration.
2015-09-22 09:26:17 +02:00
Robert Muir
b582de79ae Merge pull request #13702 from rmuir/broke_javadocs
Fix all javadocs issues, re-enable compiler warnings (but disable on java 9 where maven is broken)
2015-09-22 00:46:31 -04:00
Robert Muir
2f67cacaa3 Fix all javadocs issues, re-enable compiler warnings (but disable on java9 where maven is broken) 2015-09-21 23:35:32 -04:00
Ryan Ernst
8aa6aec344 Merge pull request #13663 from rjernst/license_cleanup
Remove unnecessary copies of license and notice files
2015-09-21 18:04:57 -07:00
Nik Everett
6876321581 Merge 'RestUtils.decodeQueryString ignores the URI fragment when parsing a query string'
Fixes #13365
2015-09-21 15:59:11 -04:00