Commit Graph

4959 Commits

Author SHA1 Message Date
Isabel Drost-Fromm 5306de3ce3 Deprecate coerce/ignore_malformed for GeoPolygonQueryBuilder
Includes update to parsing code, tests, migration docs and reference
docs.
2016-04-28 13:56:50 +02:00
Isabel Drost-Fromm 78ff4f52d6 Introduces GeoValidationMethod to GeoDistanceSortBuilder
Previously like in other geo related query parsers we were using
a combination of two booleans for coerce and ignore_malformed
which was error prone and not very clear.

Switched to using GeoValidationMethod instead as we already do
e.g. in GeoBoundingBoxQueryBuilder.

Left support for both, coerce and ignore_malformed in the parser
but deprecated the two in favour of validation method.

Introduced the same deprecation in geo bounding box query builder.
2016-04-28 12:10:56 +02:00
Adrien Grand de43bda3f3 iter 2016-04-28 09:39:08 +02:00
Adrien Grand b77893b1d1 Fail queries on not indexed fields.
While returning no hits on fields that are not mapped may be fine, it is not
for fields that are mapped but not indexed (`index:false`). We should fail the
query in that case rather than returning no hits.
2016-04-28 09:37:04 +02:00
Nik Everett 1df4efccd5 Wrap settings at 140 columns
and remove the checkstyle suppressions.
2016-04-27 18:18:20 -04:00
Nik Everett 6cccd4462c Wrap Version at 140 columns
and remove its checkstyle_suppression line
2016-04-27 17:25:37 -04:00
Nik Everett 47577613cb Wrap tasks code at 140 columns
Switch something from an explicit toString to Strings.toString which
is the same thing but with more code reuse.

Also renamed a constant to be CONSTANT_CASE.
2016-04-27 17:05:09 -04:00
Nik Everett 3468be0075 [test] Remove BulkProcessorRetryIT's generic threadpool setting
It wasn't required to excercise the retries and it caused stability issues.
2016-04-27 16:21:39 -04:00
Nik Everett d9afb8bfd6 [test] Wrap long lines in TasksIT 2016-04-27 15:32:56 -04:00
Nik Everett eb88fd1461 [test] TasksIT expected a request per copy
But instead the field stats API makes a request per primary.
2016-04-27 15:28:35 -04:00
Jim Ferenczi 9af2083765 Add XPointValues: forked utility methods from Lucene's PointValues until LUCENE-7257 is released.
Replace PointValues with XPointValues where needed.
Fixes #18010
2016-04-27 20:51:30 +02:00
Nik Everett 1feb9da3f2 ConstructingObjectParser is ObjectParser for ctors
ObjectParser makes parsing XContent 95% easier. No more nested loops.
No more forgetting to use ParseField. Consistent handling for arrays.
Awesome. But ObjectParser doesn't support building things objects whose
constructor arguments are mixed in with the rest of its properties.
Enter ConstructingObjectParser! ConstructingObjectParser queues up
fields until all of the constructor arguments have been parsed and
then sets them on the target object.

Closes #17352
2016-04-27 14:10:01 -04:00
Jim Ferenczi 573c4f3ed1 Extend field stats:
* Add isSearchable and isAggregatable (collapsed to true if any of the instances of that field are searchable or aggregatable).
* Accept wildcards in field names.
* Add a section named conflicts for fields with the same name but with incompatible types (instead of throwing an exception).
2016-04-27 16:51:53 +02:00
Nik Everett 4f9929d439 Javadoc: In Stream* scannability is priority 1! 2016-04-27 09:37:07 -04:00
Jason Tedor 0e824fab09 Fix test bug in scaling thread pool idle test
This commit fixes a test bug in the scaling thread pool idle
test. Namely, a random thread pool is chosen which could have a min pool
size of one or four but the while loop was acting as if the min pool
size was four (this is due to the test having been initially written for
only the generic thread pool).

Additionally, a latch is added between the test thread and the work
tasks to reduce the chance of a race condition between the test thread
and last few tasks.
2016-04-27 08:27:38 -04:00
Clinton Gormley 4a4e2dcace Updated the 2.3.2 bwc indices with those built from master 2016-04-26 21:03:38 +02:00
Clinton Gormley 8a7dec2315 Added 2.3.2 and bwc indices for 2.3.2 2016-04-26 15:04:01 +02:00
Jason Tedor efeec4d096 Merge pull request #17017 from jasontedor/generic-thread-pool
Actually bound the generic thread pool
2016-04-26 08:27:48 -04:00
Jason Tedor b89a935be5 Expand scaling thread pool configuration coverage
This commit slightly expands the scaling thread pool configuration test
coverage. In particular, the test testScalingThreadPoolConfiguration is
expanded to include the case when min is equal to size, and the test
testDynamicThreadPoolSize is expanded to include all possible cases when
size is greater than or equal to min.
2016-04-26 08:17:54 -04:00
Jason Tedor e3126dfac0 Fix index name equality check in RoutingNodes
This commit fixes an index name equality check in RoutingNodes. Namely,
the check was comparing an instance of Index to an instance of
String. Instead, the index name should be obtained from the Index
instance to be compared to the instance of String.

Closes #17982
2016-04-26 07:45:30 -04:00
Jim Ferenczi 543b27f4cd Merge pull request #17780 from jimferenczi/match_nodocs_query
Add MatchNoDocsQuery, a query that matches no documents and prints the reason why in the toString method.
2016-04-26 12:20:12 +02:00
Alexander Reelsen f71eb0b888 Version: Set version to 5.0.0-alpha2 2016-04-26 09:30:26 +02:00
Adrien Grand 31a9845bc2 Remove the `SearchType` setter on `SearchContext`. #17955
It was not used.
2016-04-26 09:08:37 +02:00
Areek Zillur 4a1a03428d Add bwc support for pre-5.0 completion index
This commit adds support for reading and querying
completion fields that were indexed in 2.x
2016-04-25 21:21:56 -04:00
Ali Beyad d39eb2d691 Adds tombstones to cluster state for index deletions
Previously, we would determine index deletes in the cluster state by
comparing the index metadatas between the current cluster state and the
previous cluster state and decipher which ones were missing (the missing
ones are deleted indices).  This led to a situation where a node that
went offline and rejoined the cluster could potentially cause dangling
indices to be imported which should have been deleted, because when a node
rejoins, its previous cluster state does not contain reliable state.

This commit introduces the notion of index tombstones in the cluster
state, where we are explicit about which indices have been deleted.
In the case where the previous cluster state is not useful for index
metadata comparisons, a node now determines which indices are to be
deleted based on these tombstones in the cluster state.  There is also
functionality to purge the tombstones after exceeding a certain amount.

Closes #17265
Closes #16358
Closes #17435
2016-04-25 15:43:20 -04:00
jaymode e70420ef2b convert settings for ResourceWatcherService to new infrastructure
This commit converts the settings for the ResourceWatcherService to use the new infrastructure and
registers the settings so that they do not cause errors when used.
2016-04-25 07:07:14 -04:00
Jason Tedor fd679a7021 Test min pool size of zero for scaling executor
This commit expands the configuration test for scaling executors to
include the case where the min pool size is set to zero.
2016-04-25 06:47:27 -04:00
Jason Tedor e6a06b272e Clarify message on resize scaling executor queues
This commit clarifies an error message that is produced when an attempt
is made to resize the backing queue for a scaling executor. As this
queue is unbounded, resizing the backing queue does not make sense. The
clarification here is to specify that this restriction is because the
executor is a scaling executor.
2016-04-25 06:47:27 -04:00
Jason Tedor d032de2df2 Cleanup o/e/c/u/c/EsExecutors.java
This commit removes two unused imports and applies a few other
formatting cleanups to EsExecutors.java.
2016-04-25 06:47:26 -04:00
Jason Tedor 5608fa7ac1 Actually bound the generic thread pool
This commit actually bounds the size of the generic thread pool. The
generic thread pool was of type cached, a thread pool with an unbounded
number of workers and an unbounded work queue. With this commit, the
generic thread pool is now of type scaling. As such, the cached thread
pool type has been removed. By default, the generic thread pool is
constructed with a core pool size of four, a max pool size of 128 and
idle workers can be reaped after a keep-alive time of thirty seconds
expires. The work queue for this thread pool remains unbounded.
2016-04-25 06:47:26 -04:00
Ryan Ernst d56d8b03c8 Merge pull request #17938 from rjernst/plugin_command_help
Cli: Improve output for usage errors
2016-04-22 14:58:13 -07:00
Ryan Ernst 49c47b24c1 Cli: Improve output for usage errors
When a cli throws a USAGE error, it is implied that the user did
something wrong, and probably needs help in understanding the cli
arguments. This change adds help output before the usage error is
printed.
2016-04-22 14:09:35 -07:00
Ryan Ernst d12a4bb51d Merge pull request #17933 from rjernst/camelcase4
Remove camelCase support
2016-04-22 13:46:43 -07:00
Nik Everett cc1a55423c Reindex: properly mark things as child tasks
Do this by creating a Client subclass that automatically assigns the
parentTask to all requests that come through it. Code that doesn't want
to set the parentTask can call `unwrap` on the Client to get the inner
client instance that doesn't set the parentTask. Reindex uses this for
its ClearScrollRequest so that the request will run properly after the
reindex request has been canceled.
2016-04-22 14:00:11 -04:00
Ryan Ernst d4b3ff983f Merge pull request #17662 from rjernst/verbose_install
Plugin cli: Add verbose output with zip url when installing plugin
2016-04-22 09:26:30 -07:00
Ryan Ernst 55388590c1 Remove camelCase support
Now that the current uses of magical camelCase support have been
deprecated, we can remove these in master (sans remaining issues like
BulkRequest). This change removes camel case support from ParseField,
query types, analysis, and settings lookup.

see #8988
2016-04-22 09:18:10 -07:00
Nik Everett 531bdbfdbc createTask can return null
That is totally allowed.
2016-04-22 11:26:19 -04:00
Nik Everett cdf4778483 Fix javadoc 2016-04-22 11:26:19 -04:00
Nik Everett 51621f9d75 Remove ChildTaskRequest and always pass parentTaskId when building a task
Passing parentTaskId forces the caller to handle the parentTaskId.
2016-04-22 11:26:18 -04:00
Nik Everett ffeb5e38fc Remove parent-less task methods
Callers should explicitly handle parents - either using EMPTY_TASK_ID when
a parent isn't possible or piping parents from the TransportRequest when
possible.
2016-04-22 11:26:18 -04:00
Nik Everett 2b56a42b69 Move parentTaskId into TransportRequest
Now everything can have a parent!
2016-04-22 11:26:18 -04:00
Nik Everett 61f0b665b8 Fix fallback setting for two get/2 2016-04-22 11:10:01 -04:00
Nik Everett 1c2e84ba46 Fail request if rescore window > 10,000
The setting is named `index.max_rescore_window` and defaults to
`index.max_result_window` which defaults to 10,000.
2016-04-22 11:10:01 -04:00
Jason Tedor 21b1da1bea Kill thread local leak
This commit modifies InjectorImpl to prevent a thread local leak in
certain web containers. This leak can arise when starting a node client
inside such a web container. The underlying issue is that the
ThreadLocal instance was created via an anonymous class. Such an
anonymous class has an implicit reference back to the InjectorImpl in
which it was created. The solution here is to not use an anonymous class
but instead just create the reference locally and set it on the thread
local.

Relates #17921
2016-04-22 08:05:33 -04:00
Martijn van Groningen c5ad2e2865 Changed indexed scripts to be stored in the cluster state instead of the `.scripts` index.
Also added max script size soft limit for stored scripts.

Closes #16651
2016-04-22 13:42:55 +02:00
Daniel Mitterdorfer ae61fc4780 Increase number of concurrent requests in NettyHttpRequestSizeLimitIT
For some seeds the number of concurrent requests previously defined
in NettyHttpRequestSizeLimitIT was too low to trigger the intended
breaker limit.

With this commit we increase the number of concurrent requests that
are sent to the test cluster thus triggering the limit.
2016-04-22 13:28:12 +02:00
Adrien Grand 370af45c09 Add back range support to `ip` fields. #17777
`ip` fields currently fail range queries when either bound is inclusive. This
commit makes ranges also work in the exclusive case to be consistent with other
data types.
2016-04-22 09:58:01 +02:00
Isabel Drost-Fromm 1939425378 Merge pull request #17908 from MaineC/enhancement/make-script-writeable
Makes Script type writeable
2016-04-22 08:39:01 +02:00
Isabel Drost-Fromm 36a8f7b7bb Address stylistic comments. 2016-04-21 22:02:17 +02:00
Alexander Kazakov 3046055bd0 Fix calculation of time of term vectors request
This commit addresses an issue in the calculation of the time to execute
a term vectors request. The underlying issue was due to measuring the
took time by passing the starting wall clock time along with the request
and calculating the total time using the ending wall clock time on the
responding node. The fix is to use a relative time source on a single
node.


Relates #17817
2016-04-21 15:46:14 -04:00