2757 Commits

Author SHA1 Message Date
Martijn van Groningen
8d49aa398f Added facet support to the percolate api.
Closes #3851
2013-10-21 19:13:28 +07:00
Luca Cavanna
b7d8c275eb Fix small typo in terms lookup tests mapping (count api tests) 2013-10-18 17:55:21 +02:00
Matt Weber
e6fc416adc Fix small typo in terms lookup tests mapping. 2013-10-18 17:55:21 +02:00
Simon Willnauer
f749db26e8 Allow awareness attributes to be reset via the API
Currently we don't allow resetting the awareness
attribute via the API since it requires at least one
non-empty string to update the setting. This commit
allows resetting this using an empty string.

Closes #3931
2013-10-18 16:25:00 +02:00
Blake Smith
03a89297ba Fix teh typos in javadocs 2013-10-18 12:19:37 +02:00
Shay Banon
c9b0e1de6c Settings queue_size on index/bulk TP can cause rejection failures when executed over network
The #3526 fix was not complete, it handled cases of on node execution, but didn't properly handle cases where it was executed over the network, and forcing the execution of the replica operation when done over the wire.

This relates to #3854

closes #3929
2013-10-17 17:06:44 +03:00
Boaz Leskes
2593b6e644 Terms facet will now throw a parsing exception if no field, fields or a script is supplied.
Previously you'd get an NPE. Also added extra exception when called with unknown parameters.
2013-10-17 09:26:43 +02:00
Martijn van Groningen
cc9ab111a0 Prohibit indexing a document with parent for a type that doesn't have a _parent field configured and prohibit adding a _parent field to an existing mapping.
Closes #3848 #3849
2013-10-15 18:29:44 +02:00
Simon Willnauer
89de3ab627 Added simple count down class that allows to be fast forwarded
Closes #3910
2013-10-15 17:47:51 +02:00
Luca Cavanna
fcf13e0fa7 Delete warmer api to support acknowledgements
Added support for acknowledgements in delete warmer api using the generic mechanism introduced in#3786

Closes #3833
2013-10-15 17:47:50 +02:00
Luca Cavanna
31142ae471 Put warmer api to support acknowledgements
Added support for acknowledgements in put warmer api using the generic mechanism introduced in #3786

Closes #3831
2013-10-15 17:47:50 +02:00
Luca Cavanna
55f1eab09a Added generic cluster state update ack mechanism
Added new AckedClusterStateUpdateTask interface that can be used to submit cluster state update tasks and allows actions to be notified back when a set of (configurable) nodes have acknowledged the cluster state update. Supports a configurable timeout, so that we wait for acknowledgement for a limited amount of time (will be provided in the request as it curently happens, default 10s).

Internally, a low level AckListener is created (InternalClusterService) and passed to the publish method, so that it can be notified whenever each node responds to the publish request. Once all the expected nodes have responded or the timeoeout has expired, the AckListener notifies the action which will return adding the proper acknowledged flag to the response.

Ideally, this new mechanism will gradually replace the existing ones based on custom endpoints and notifications (per api).

Closes #3786
2013-10-15 17:47:50 +02:00
Alexander Reelsen
4d19239ec4 Add support for Lucene SuggestStopFilter
The suggest stop filter is an improved version of the stop filter, which
takes stopwords only into account if the last char of a query is a
whitespace. This allows you to keep stopwords, but to allow suggesting for
"a".

Example: Index document content "a word". You are now able to suggest for
"a" and get back results in the completion suggester, if the suggest stop
filter is used on the query side, but will not get back any results for
"a " as this is identified as a stopword.

The implementation allows to set the `remove_trailing` parameter for a
custom stop filter and thus use the suggest stop filter instead of the
standard stop filter.
2013-10-15 16:12:02 +02:00
Martijn van Groningen
c1ec32aa1e Added num_queries and memory_size stats to percolate stats.
Closes #3883
2013-10-15 10:30:49 +02:00
Simon Willnauer
376d2d873f Reenable test after fix 2013-10-14 20:57:02 +02:00
Britta Weber
34441f3897 fix naming in function_score
- "boost" should be "boost_factor"
    - "mult" should be "multiply"

Also, store combine function names in ImmutableMap instead of iterating
over all possible names each time.

closes #3872 for master
2013-10-14 14:56:59 +02:00
Bogdan Dumitrescu
899189694f Replaced hardcoded boolean value with correct parameter
Implemented changes suggested by review.

Closes #3898
2013-10-14 14:52:45 +02:00
Shay Banon
b99fca342f index another doc in test and flush to force merge 2013-10-14 14:51:08 +02:00
Simon Willnauer
08db1fb292 Disable testSegmentsWithMergeFlag with AwaitsFix 2013-10-14 14:48:41 +02:00
Simon Willnauer
7a7370e3c8 Add match query support for stacked tokens
SynonymFilters produces token streams with stacked tokens such that
conjunction queries need to be parsed in a special way such that the
stacked tokens are added as an innner disjuncition.

Closes #3881
2013-10-14 14:09:38 +02:00
Britta Weber
719d1e0318 fix bug in term vector api, payloads were not handled correctly when some where missing
The array holding the payloads (TermVectorFields.payloads) is reused for each token. If the
previous token had payloads but the current token had not, then the payloads of the previous
token were returned, because the payloads of the previous token were never invalidated.
For example, for a field only contained two tokens each occurring once, the first having a
payload and the second not, then for the second token, the payload of the first was returned.

closes #3873
2013-10-14 13:41:32 +02:00
Britta Weber
4e7a1788ea enable delimited payload token filter
closes #3859
2013-10-14 13:41:30 +02:00
Britta Weber
ce0ab79155 move tests to unit test 2013-10-14 13:41:25 +02:00
Martijn van Groningen
7286a015db The has_child query's inner query now is wrapped in a filtered query with the child type as filter, this prevents other children from being returned as hit.
Extended the specialized simplified mapping source method to support metadata mapping fields. These fields can just specified as normal fields, but will automatically be placed as top level mapping field.

Closes #3818
2013-10-14 12:43:16 +02:00
Shay Banon
c093e90d51 Segments API: Support merge id on segments (groups segments being merged)
Return a merge_id element in each segment of the segments API, allowing to group segments that are being merged as part of a single merge and indicate which ones are being merged now.
closes #3904
2013-10-14 11:04:48 +02:00
Simon Willnauer
148a772ea0 Randomly use Bulk in AbstractIntegrationTest#indexRandom 2013-10-14 10:55:10 +02:00
Simon Willnauer
9dc59e29fa Retry blocking if async indexing is rejected due to queue size
Some tests use AbstractIntegrationTest#indexRandom which sometimes uses async
indexing. This can easily run into queue size based rejections on a slow
box. In that case we should retry blocked indexing.
2013-10-14 10:55:09 +02:00
Alexander Reelsen
df95453430 Added missing builder.endObject calls 2013-10-14 10:02:29 +02:00
Simon Willnauer
529b9c8b39 Use smart client in busy waiting loop
This test fails since we use random transport clients. Let's see
if it stabelizes with a smart client in the loop and debug further
if it helps.
2013-10-13 23:05:40 +02:00
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
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
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
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