Commit Graph

22914 Commits

Author SHA1 Message Date
Nik Everett b665d8a187 Painless: Add flag support to regexes
Painless: Add support for //m
Painless: Add support for //s
Painless: Add support for //i
Painless: Add support for //u
Painless: Add support for //U
Painless: Add support for //l
  This means "literal" and is exposed for completeness sake with
  the java api.
Painless: Add support for //c
  c enables Java's CANON_EQ (canonical equivalence) flag which makes
  unicode characters that are canonically equal match. Java's javadoc
  gives "a\u030A" being equal to "\u00E5". That is that the "a" code
  point followed by the "combining ring above" code point is equal to
  the "a with combining ring above" code point.
Update docs and add multi-flag test
Whitelist most of the Pattern class.
2016-06-16 15:00:31 -04:00
Robert Muir 3ebbbb3e37 Merge pull request #18924 from rmuir/improve_lambda_syntax
improve lambda syntax (allow single expression)
2016-06-16 13:49:03 -04:00
Ryan Ernst 96321d7749 Remove outtdated comment referring to name/description for Plugin class 2016-06-16 10:18:10 -07:00
Robert Muir 251001e435 add more simple tests 2016-06-16 12:40:30 -04:00
Robert Muir fdd1f152a7 improve lambda syntax (allow single expression) 2016-06-16 11:02:06 -04:00
Robert Muir ccad99fb5c Merge pull request #18911 from rmuir/noncapturing_lambdas
non-capturing lambda support
2016-06-16 10:31:54 -04:00
Alexander Kazakov 9eea1b6833 Fix flat_settings REST parameter
* Get XContent params from request in Nodes rest actions
* Adding test for nodes info rest api
2016-06-16 10:03:51 -04:00
Simon Willnauer b22c526b34 Cut over settings registration to a pull model (#18890)
Today we have a push model for registering basically anything. All our extension points
are defined on modules which we pass in to plugins. This is harder to maintain and adds
unnecessary dependencies on the modules itself. This change moves towards a pull model
where the plugin offers a getter kind of method to get the extensions. This will also
help in the future if we need to pass dependencies to the extension points which can
easily be defined on the method as arguments if a pull model is used.
2016-06-16 15:52:58 +02:00
Nik Everett 5aa4769b25 Move waitForTaskCompletion into TaskManager
This allows for listening for the waiting to start using
MockTaskManager. This allows us to work around a race condition
in the TasksIT.
2016-06-16 09:45:46 -04:00
Daniel Mitterdorfer 0faa9409b3 Force test infra to use node client in NettyHttpRequestSizeLimitIT 2016-06-16 15:36:29 +02:00
Simon Willnauer e442f07460 Remove dead code 2016-06-16 15:29:49 +02:00
Nik Everett 8d3ef742db Painless: =~ and ==~ operators
Adds support for the find operator (=~) and the match operator (==~)
to painless's regexes. Also whitelists most of the Matcher class and
documents regex support in painless.

The find operator (=~) returns a boolean that is the result of building
a matcher on the lhs with the Pattern on the RHS and calling `find` on
it. Use it like this:

```
if (ctx._source.last =~ /b/)
```

The match operator (==~) returns boolean like find but instead of calling
`find` on the Matcher it calls `matches`.

```
if (ctx._source.last ==~ /[^aeiou].*[aeiou]/)
```

Finally, if you want the actual matcher you do:

```
Matcher m = /[aeiou]/.matcher(ctx._source.last)
```
2016-06-16 08:42:33 -04:00
Tanguy Leroux 3c9712794e Merge pull request #18586 from a2lin/msearch_error_fix
Adding status field in _msearch error request bodies
2016-06-16 14:31:39 +02:00
Jim Ferenczi b13cab033a Merge pull request #18779 from jimferenczi/breadth_first_heuristic
Automatically set the collection mode to breadth_first in the terms aggregation when the cardinality of the field is unknown or smaller than the requested size.
2016-06-16 14:28:02 +02:00
Robert Muir 78d06666f8 Merge pull request #18913 from uschindler/painless_megamorphic_opto
Remove useless dropArguments in megamorphic cache
2016-06-16 08:07:57 -04:00
Uwe Schindler 4293030fd9 painless: Remove stale comment and remove declared exception 2016-06-16 11:46:11 +02:00
Jim Ferenczi ad232aebbe Set collection mode to breadth_first in the terms aggregation when the cardinality of the field is unknown or smaller than the requested size.
closes #9825
2016-06-16 11:33:40 +02:00
Uwe Schindler f2d6219426 painless: remove useless dropArguments and throws statement in megamorphic cache; add tests 2016-06-16 11:08:10 +02:00
Mike McCandless 3f221bf7cb Add total_indexing_buffer/_in_bytes to nodes info API 2016-06-16 04:39:34 -04:00
Christoph Büscher 01004c72ba Improve TimeZoneRoundingTests error messages
Currently the error messages for failing tests in the TimeZoneRoundingTests test
suite are hard to read because they usually report the actual end expected date
in milliseconds utc (e.g. "Expected: <1414270860000L> but: was <1414270800000L>".
This makes failing tests hard to read.

This change introduces a new Matcher that can be used for equality checks for
long dates but reports the error both as a formated date string according to
some time zone and also as the actual long values, so you get messages like
"Expected: 2014-10-26T00:01:00.000+03:00 [1414270860000] but:  was
"2014-10-26T00:00:00.000+03:00 [1414270800000]".

Also clean cleaning up some helper methods and generally simplifying a few test
cases. Otherwise this change shouldn't affect either the scope of the test or
anything about the rounding implementation itself.
2016-06-16 10:10:04 +02:00
Adrien Grand 9ffb2ff6ba Expose half-floats. #18887
They have been implemented in https://issues.apache.org/jira/browse/LUCENE-7289.
Ranges are implemented so that the accuracy loss only occurs at index time,
which means that if you are searching for values between A and B, the query will
match exactly all documents whose value rounded to the closest half-float point
is between A and B.
2016-06-16 09:46:39 +02:00
Simon Willnauer 18ff051ad5 Simplify ScriptModule and script registration (#18903)
Registering a script engine or native scripts still uses Guice today
and is much more complicated than needed. This change moves to a pull
based model where script plugins have to implement a dedicated interface
`ScriptPlugin` and defines simple getter returning instances rather than
classes.
2016-06-16 09:35:13 +02:00
Alexander Lin 7d42e7e716 Closes #18013. Added status field to _msearch response bodies. 2016-06-16 00:25:17 -07:00
Daniel Mitterdorfer edf010f878 Force single-node cluster in NettyHttpRequestSizeLimitIT 2016-06-16 07:30:55 +02:00
Robert Muir ec7215e5f2 get non-capturing lambdas working 2016-06-16 01:25:43 -04:00
David Pilato abfde4d33e Merge pull request #18909 from philipskokoh/master
TransportClient instead of Client in the code snippet at Transport Client documentation
2016-06-16 05:52:58 +02:00
David Pilato b036d238f5 Fix typo 2016-06-16 05:51:39 +02:00
Philips Kokoh cc465a38bf TransportClient instead of Client in the code 2016-06-16 11:32:49 +08:00
Robert Muir f7b7204721 Merge pull request #18907 from rmuir/fix_horrible_capture
Fix horrible capture
2016-06-15 20:54:15 -04:00
Robert Muir 60176afdde clean up a bit more 2016-06-15 20:30:16 -04:00
Ryan Ernst a4503c2aed Plugins: Remove name() and description() from api
In 2.0 we added plugin descriptors which require defining a name and
description for the plugin. However, we still have name() and
description() which must be overriden from the Plugin class. This still
exists for classpath plugins. But classpath plugins are mainly for
tests, and even then, referring to classpath plugins with their class is
a better idea. This change removes name() and description(), replacing
the name for classpath plugins with the full class name.
2016-06-15 17:12:22 -07:00
Ryan Ernst 7f6e0c6c02 fix compile for ingest plugin lambda 2016-06-15 16:57:01 -07:00
Robert Muir 54797b7d09 don't let megamorphic cache "capture" arbitrary arguments.
pass the shit we need as bootstrap params
2016-06-15 19:33:59 -04:00
Nik Everett dc2d7a2a6d Test: wait for task to start before waiting for it to finish (#18902) 2016-06-15 18:42:48 -04:00
Jason Tedor 8caaf9ad11 Fix thread pool docs regarding dynamic settings
Thread pool settings are no longer dynamically updatable since
da74323141. This commit removes a leftover
note from the thread pool module docs that incorrectly states that
thread pool settings are dynamically updatable.
2016-06-15 18:25:25 -04:00
Tal Levy a26260fb72 new ScriptProcessor for Ingest (#18193)
add new ScriptProcessor for executing ES Scripts within pipelines
2016-06-15 14:57:18 -07:00
Robert Muir 154d750e4b Merge pull request #18899 from rmuir/more_def_cleanup
fix bugs in operators and more improvements for the dynamic case
2016-06-15 17:06:46 -04:00
Daniel Mitterdorfer 889d802115 Refine wording in benchmark README and correct typos 2016-06-15 23:01:56 +02:00
Areek Zillur 7e678443d3 Merge pull request #18802 from areek/enhancement/shrink_request_parser
Add Shrink request source parser to parse create index request body
2016-06-15 17:53:43 -03:00
Daniel Mitterdorfer 32dd813436 Fix typo in benchmark README 2016-06-15 22:45:47 +02:00
Uwe Schindler ae6ce1c42e Small refactoring and cleanup to separate the polymorphic and megamorphic case 2016-06-15 22:27:30 +02:00
Areek Zillur 1a59a8418a Merge branch 'master' into enhancement/shrink_request_parser 2016-06-15 15:49:40 -04:00
Uwe Schindler 6e83f41e94 Merge branch 'more_def_cleanup' of https://github.com/rmuir/elasticsearch into more_def_cleanup 2016-06-15 21:47:28 +02:00
Uwe Schindler 5b11b15300 fix typo 2016-06-15 21:46:58 +02:00
Nik Everett ab2a4a0d72 Fix exception on task not found
Silly protected method....
2016-06-15 15:29:42 -04:00
Nik Everett 8cc848f31c Allow FieldStatsRequest to disable cache 2016-06-15 15:10:46 -04:00
Alexander Kazakov 2fc328e10a Docs: Fix typo in RestIT 2016-06-15 15:06:50 -04:00
Areek Zillur eb9b4437b2 update docs 2016-06-15 14:57:17 -04:00
Ryan Ernst 8de90a66a1 Relax plugin id url heuristic, since java uses single slash instead of double 2016-06-15 11:43:38 -07:00
Robert Muir 786c3b0fa8 speed up compound assignments 2016-06-15 14:38:37 -04:00