Commit Graph

5936 Commits

Author SHA1 Message Date
Simon Willnauer 5f1efba28c s/ElasticSearch/Elasticsearch in src/test 2013-10-13 22:37:40 +02:00
Simon Willnauer edbfb04af6 Subclass ElasticSearchTestCase across the board
All tests in the test package should subclass ESTestCase to benefit from
random time-zones and locale etc.
2013-10-13 20:33:22 +02:00
Clinton Gormley 9a062e465c [DOCS] Reorganised common API conventions 2013-10-13 16:46:56 +02:00
Clinton Gormley 4316b13880 [DOCS] Render common options on the same page 2013-10-13 14:14:50 +02:00
Shay Banon df0ae93ede test variations of multi field query string queries 2013-10-13 11:46:08 +02:00
Shay Banon 4421a3403a Query String: Support multiple fields regexp queries
The query string query should apply regexp queries to execute on multiple fields as all the other queries.
closes #3901
2013-10-13 01:27:37 +02:00
Shay Banon 420b3396f4 Set queue sizes by default on bulk/index thread pools
Now that we properly fixed the ability to set the queue size on the index / bulk thread pool, we should actually set them to a somehow reasonable value to protect from users potentially overflowing our system.

I suggest defaults to be 50 for bulk, and 200 for indexing.

Also, set the thread pool for get, which we should set (in a similar value to a "read" queue size we have today).
closes #3888
2013-10-12 21:51:37 +02:00
Shay Banon 8a3df0cf78 remove irrelevant comment now that we pass the reuse strategy 2013-10-12 21:27:38 +02:00
Alexander Reelsen e0b8b58479 Fix toXContent of GeoShapeQueryBuilder
A missing endObject() resulted in serialization errors.

Closes #3878
2013-10-11 17:51:58 +02:00
Simon Willnauer 2d523ace87 Support date math for `origin` decay function parsing
The parser used the method that was supposed to be used for parsing on
the indexing side that never supported date math.

Closes #3892
2013-10-11 17:20:25 +02:00
David Pilato ef26df4f42 Add integration test for PluginManager
We want to make sure that Plugin Manager still downloading plugins from internet.
New tests requires internet access (`@Network` annotation has been added).

By default, tests annotated with `@Network` are not launched.

If you need to run these tests, use `-Dtests.network=true` option.

Closes #3894.
2013-10-11 15:03:38 +02:00
Simon Willnauer 530340fa76 cleanup tests 2013-10-11 14:40:50 +02:00
Boaz Leskes 977cb4a729 Make the get source REST API source fetching query parameters consistent with other API
The get source rest endpoint now uses _source_* parameters.
 Also it will now throw a validation error if you turn off source fetching.

Closes #3886
2013-10-11 12:25:21 +02:00
Simon Willnauer f4cf5a7d4a Fix RobinEngineIntegrationTest - missed to explicitly create the index 2013-10-11 11:33:18 +02:00
Subhash Gopalakrishnan b758b76da4 Support year units in date math expressions
According to http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-date-format.html, the date math expressions support M (month), w (week), h (hour), m (minute), and s (second) units. Why years are not supported? Please add support for year units.

Closes #3828.
Closes #3874.
2013-10-11 09:24:52 +02:00
Adrien Grand 7674f1edd4 Use Locale.ROOT by default to parse dates instead of the system locale.
Closes #3852.
2013-10-11 09:01:39 +02:00
Clinton Gormley 8462f88c39 [DOCS] Added more specific versions to the suggesters 2013-10-10 20:59:12 +02:00
Simon Willnauer 285f165100 Allow 'index.compound_on_flush' to be dyncamically changed 2013-10-10 19:01:32 +02:00
Martijn van Groningen 6163c7d8e5 Serialization improvement 2013-10-10 17:07:31 +02:00
Martijn van Groningen 1792bd6b16 Fixed serialization error. POST_RECOVERY is now also serialized 2013-10-10 16:15:33 +02:00
Simon Willnauer ec809200f0 Add Random MergePolicy via index templates in integration tests
This commit adds support for random merge policies set for every
index created in an AbstractIntegrationTest. It will either set
'logbyte', 'logdoc' or 'tiered' merge policy as well as a random
value for compound files.
2013-10-10 15:12:35 +02:00
Martijn van Groningen ec6539df37 In the delete by query also acquire a searcher when shard state is RECOVERING and POST_RECOVERING 2013-10-10 14:02:33 +02:00
Adrien Grand f2d75654bf Add clear warnings that only the default codec, postings format and doc values format have backward compatibility warranties. 2013-10-10 13:30:08 +02:00
Simon Willnauer 0eea6e8183 Enable Random TransportClients in tests 2013-10-10 13:23:02 +02:00
Clinton Gormley ba1b4886e3 [DOCS] Moved "named filters/queries" up one level 2013-10-10 11:23:08 +02:00
Jonathan CHAMPION 278e99ef69 Fix small doc mistakes 2013-10-10 11:20:13 +02:00
Simon Willnauer e14e2a6597 Added IndexRequest#source(Object...) input validation
Added checks to IndexRequest#source(Object...) to ensure and even number
of parameters. This method otherwise throws an AIOOBException which is
confusing to users and doesn't report the root cause of the problem.
2013-10-10 11:16:39 +02:00
Martijn van Groningen d5a1eb3758 moved AwaitsFix to class level 2013-10-10 10:29:39 +02:00
Boaz Leskes 2cd1f53f69 Added an AwaitsFix to testDeleteAllOneIndex. Martijn is on it. 2013-10-10 08:52:11 +02:00
Simon Willnauer 15b4d70298 Add AssertingTransport that deploys basic BW-Compat serialization checks 2013-10-09 18:27:26 +02:00
Simon Willnauer a15f149dc6 Fix GetIndexTemlatesRequest if serialized with includeAll and a old ES version 2013-10-09 18:26:26 +02:00
Adrien Grand 4fa8f6f61f Doc values integration.
This commit allows for using Lucene doc values as a backend for field data,
moving the cost of building field data from the refresh operation to indexing.
In addition, Lucene doc values can be stored on disk (partially, or even
entirely), so that memory management is done at the operating system level
(file-system cache) instead of the JVM, avoiding long pauses during major
collections due to large heaps.

So far doc values are supported on numeric types and non-analyzed strings
(index:no or index:not_analyzed). Under the hood, it uses SORTED_SET doc values
which is the only type to support multi-valued fields. Since the field data API
set is a bit wider than the doc values API set, some operations are not
supported:
 - field data filtering: this will fail if doc values are enabled,
 - field data cache clearing, even for memory-based doc values formats,
 - getting the memory usage for a specific field,
 - knowing whether a field is actually multi-valued.

This commit also allows for configuring doc-values formats on a per-field basis
similarly to postings formats. In particular the doc values format of the
_version field can be configured through its own field mapper (it used to be
handled in UidFieldMapper previously).

Closes #3806
2013-10-09 16:34:30 +02:00
Lee Hinman 4b96b2cf3d Fix broken links in example configuration file 2013-10-09 04:16:15 -06:00
Luca Cavanna 897084d5c2 Added QueryBuilders#fuzzyQuery method that accepts value parameter as an object
Fixed javadocs

Closes #3616
2013-10-09 11:35:31 +02:00
Matt Weber 3225375a77 Add monitoring link for es2graphite. 2013-10-09 10:47:59 +02:00
Martijn van Groningen 1f117c194c Support the `has_child`, `has_parent`, `top_children` queries (and filters) in other apis than just search api. The queries are also now supported in count, explain (return dummy explination) and delete by query apis.
Migrate SearchContext.Rewrite to Releasable. All the parent child queries are now implemented as Lucene queries and the state is kept in the Weight.
Completely disable caching for `has_child` and `has_parent` filters, this has never worked and it also can also never work. The matching docIds are cached per segment while the collection of parent ids is top level.

Closes #3822
2013-10-09 10:20:23 +02:00
Ben McCann 7953eed36a Fix comment grammar 2013-10-09 10:04:37 +02:00
Lee Hinman dede6ee874 Remove extra 'processors' anchor in threadpool docs 2013-10-09 01:56:49 -06:00
Adrien Grand 97958ed02a Improved warm-up of new segments.
* Merged segments are now warmed-up at the end of the merge operation instead
  of _refresh, so that _refresh doesn't pay the price for the warm-up of merged
  segments, which is often higher than flushed segments because of their size.
* Even when no _warmer is registered, some basic warm-up of the segments is
  performed: norms, doc values (_version). This should help a bit people who
  forget to register warmers.
* Eager loading support for the parent id cache and field data: when one
  can't predict what terms will be present in the index, it is tempting to use
  a match_all query in a warmer, but in that case, query execution might not be
  much faster than field data loading so having a warmer that only loads field
  data without running a query can be useful.

Closes #3819
2013-10-08 23:06:55 +02:00
David Pilato 88a2f54dfe plugin -remove deletes bin directory
Adding test for #3847.
2013-10-08 16:19:10 +02:00
David Pilato 4ee7f3521f plugin -remove deletes bin directory
I tried to install a plugin directly from disk, but used the wrong arguments. Totally my fault for not RTFM properly.

However, by following the instructions printed out by `bin/plugin`, I ended up deleting my $ES/bin directory.

```
$ pwd
/tmp/elasticsearch-0.90.5
$ ls
LICENSE.txt    NOTICE.txt     README.textile bin            config         lib
$ bin/plugin --install file:///tmp/foo.zip
-> Installing file:///tmp/foo.zip...
Failed to install file:///tmp/foo.zip, reason: plugin directory /tmp/elasticsearch-0.90.5/plugins already exists. To update the plugin, uninstall it first using -remove file:///tmp/foo.zip command
$ bin/plugin -remove file:///tmp/foo.zip
-> Removing file:///tmp/foo.zip
Removed file:///tmp/foo.zip
$ ls
LICENSE.txt    NOTICE.txt     README.textile config         lib
```

I reproduced the problem in 0.90.5 and the latest master.
Closes #3847.
2013-10-08 15:52:59 +02:00
Adrien Grand 6b02611971 Update Lucene to version 4.5.0. 2013-10-08 15:44:03 +02:00
Boaz Leskes a10c195667 Add FieldMappers before adding Mappers (used for parsing) and while holding the relevant's ObjectMapper mutex
Adding the mappers first could cause the wrong FieldMappers to be used during object parsing

Also:
Removed MergeContext.newFieldMappers, MergeContext.newObjectMappers and relatives as they are not used anymore.
Similarly removed MergeContext.addFieldDataChange & fieldMapperChanges as they were not used.

Closes #3844
2013-10-08 09:51:33 +02:00
Alexander Reelsen a03013ea25 Remove @Required annotation
The @Required annotation is used for documentation purposes only anyway.
2013-10-07 17:25:18 +02:00
Alexander Reelsen abcf8fc0f7 Improve exception handling for river startup
Due to a change in 0.90 some exceptions may show up when starting a river,
even though this is not a problem as the shard has not been initialized
yet and a retry is scheduled.
2013-10-07 17:02:24 +02:00
Alexander Reelsen 19099ab3da Rejecting invalid fields inside of completion field
Only valid fields (input, output, weight and payload) are now allowed inside a completion field.
This makes sure that typos like "inputs" are caught on indexing.
2013-10-07 15:08:52 +02:00
Clinton Gormley 264a00a40f [DOCS] Added pages explaining lucene query parser syntax and regular expression syntax 2013-10-07 14:42:49 +02:00
Shay Banon e9d9ade10f Better logic ignoring filters when parsing
When parsing a filter, we effectively have a case where we need to ignore a filter. For example, when an "and" filter has no elements. Ignoring a filter is different compared to matching on all or matching on none, because an and filter with no elements should simply be ignored in the context of a bool filter for example, regardless if its used within a must or a must_not filter.

We should be consistent in our codebase when handling these use case. See also #3809

closes #3838
2013-10-07 11:12:47 +02:00
Shay Banon 1af38cf3f3 use the already used constant for match no filter 2013-10-07 09:56:49 +02:00
Alexander Reelsen f0cf97c0ac Changed documentation to use getter notation
Updated some java documentation to reflect the use of getters instead of calling methods based on field names.

Relates to #2657
2013-10-06 21:18:43 +02:00