Commit Graph

6323 Commits

Author SHA1 Message Date
Lee Hinman db431b7cb3 Remove the `field` and `text` queries.
The `text` query was replaced by the `match` query and has been
deprecated for quite a while.

The `field` query should be replaced by a `query_string` query with
the `default_field` specified.

Fixes #4033
2013-12-16 08:59:36 -07:00
Simon Willnauer 3e321972cc Throw IAE if suggest results return differently sized results.
If the term suggester is used the results are merged depending on
the number of terms produced by the tokenizer / tokenfilter. If a
term suggester is executed across multiple indices that share the
same field but with different analysis chains we can't merge the
result anymore sicne tokens are our of order or have a different size.

This commit throws ESIllegalArgumentException if the number of entries
are not the same across all results.

Closes #3196
2013-12-16 15:31:44 +01:00
Shay Banon 2f2b95a6b8 better cluster reroute allocation benchmark 2013-12-16 15:29:50 +01:00
Luca Cavanna 173a91bb46 Added new IndicesLifecycle.Listener method that allows to listen for any IndexShardState internal change.
Closes #4413
2013-12-16 15:00:15 +01:00
Adrien Grand 4e7ce4ee02 Make field data changes immediately taken into account and add the ability to disallow field data loading.
This commit changes field data configuration updates so that they are
immediately taken into account for loading new segments. The way it works
is that field data configuration is now cached separately from the field
data cache, meaning that it is now possible to clear the field data
configuration from IndexFieldDataService while the cache will stay around. On
the next time that Elasticsearch will reload field data configuration, it will
check if there is already a cache entry, and reuse it if it exists.

To disable field data loading, all that is required is to change the field
data format to "none" (supported by all field data types) using the update
mapping API. Elasticsearch will then refuse to load field data on any new
segment, but field data which has been loaded on the previous segments will
remain available. So you need to clear the field data cache in order to
reclaim memory (otherwise memory will be reclaimed slower, as segments get
merged).

Close #4430
Close #4431
2013-12-16 14:34:33 +01:00
Simon Willnauer 8d321530de Reset source shards to `started` if canceling relocation.
Currently we miss to reset the source shards status to ACTIVE if we cancel
a relocation. If the shard is RELOCATING we need to reset to state ACTIVE.

Closes #4457
2013-12-16 11:52:16 +01:00
Simon Willnauer 30c6f2fa23 Improve RoutingNodes API
Currently the RoutingNodes API allows modification of it's internal state outside of the class.
This commit improves the APIs of `RoutingNode` and `RoutingNode` to change internal state
only within the classes itself.

Closes #4458
2013-12-16 11:50:45 +01:00
Sebastian Geidies 6af80d5017 Optimizes performance of AllocationDecider execution. Instead of using loops over all ShardRoutings, do accounting in RoutingNodes.
Speeds up recalculating cluster state on large clusters.
2013-12-16 11:35:45 +01:00
Alexander Reelsen 6a856c86e8 Cat API: Add endpoint to show aliases
This endpoint allows to check aliases, their indices, if a filter is
configured along with routing values for searching and indexing.

Closes #4414
2013-12-16 10:37:06 +01:00
Boaz Leskes 33e49a55f7 Increased timeout in ClusterServiceTests.testTimeoutUpdateTask to 100ms
The previous 2ms timeout was too small and caused a racing condition in timeout handling. This will be fixed but requires more work.
2013-12-16 10:02:24 +01:00
Simon Willnauer a668cd22d8 wait until cluster-state is ready after startup 2013-12-15 22:26:11 +01:00
Simon Willnauer d9e988aea9 Fix QuorumLocalGatewayTests#testChangeInitialShardsRecovery to start only one shard to not fulfill the quorum 2013-12-15 20:06:22 +01:00
Boaz Leskes 0f7c5dbc86 Update minimum_master_nodes comment to match documentation
Someone on the mailing list wrongly interpreted it to mean the current node is not included in the calculation.
2013-12-15 11:25:36 +01:00
Igor Motov d8ba92cfa8 Resolve potential deadlock state during EsThreadPoolExecutor shutdown
Fixes #4334

The deadlock occurs between monitor object of EsThreadPoolExecutor and mainLock of ThreadPoolExecutor. The shutdown method of EsThreadPoolExecutor obtains the lock on monitor first and waits for mainLock of ThreadPoolExecutor in ThreadPoolExecutor#shutdown for part of the processing, while EsThreadPoolExecutor#terminated is executed under mainLock and tries to obtain monitor to notify listeners.
2013-12-14 21:45:03 -05:00
Simon Willnauer 8f85d63b67 Enable incremental compilation using a workaround for the maven-compiler-plugin 3.1 bug 2013-12-14 21:56:01 +01:00
Shay Banon 80ab75e54e upgrade to latest jsr166 2013-12-14 01:27:18 +01:00
Shay Banon 59d85bc22a upgrade to Jackson 2.3.0 2013-12-14 00:53:52 +01:00
Luca Cavanna 9b121baafc More common AcknowledgedRestResponseActionListener
Introduced use of AcknowledgedRestResponseActionListener in put/delete index template
2013-12-13 19:39:46 +01:00
Simon Willnauer d684a2b8da Don't try to run check-index in MockDirectoryWrapper
if the MockDirWrapper checks the index on close it closes all
closeables that is has to crash the index if something is not flushed yet.
For us this is a problem since the input is still used. We need to fix this in
lucene first.
2013-12-13 17:44:10 +01:00
Adrien Grand 19c8d18b14 Relax a bit the accuracy tests on SloppyMaths.
Tests now ensure that the computed distance is correct within 1‰ instead of 1‱.
2013-12-13 15:42:39 +01:00
Adrien Grand 36bd9cc432 Aggregations: Ordinals-based string bucketing support.
When the ValuesSource has ordinals, terms ordinals are used as a cache key to
bucket ordinals. This can make terms aggregations on String terms significantly
faster.

Close #4350
2013-12-13 15:34:02 +01:00
Martijn van Groningen cc61348013 Fixed test bug 2013-12-13 14:54:21 +01:00
Martijn van Groningen 10e2528cce Added the `force_source` option to highlighting that enforces to use of the _source even if there are stored fields.
The percolator uses this option to deal with the fact that the MemoryIndex doesn't support stored fields,
this is possible b/c the _source of the document being percolated is always present.

Closes #4348
2013-12-13 13:39:53 +01:00
Simon Willnauer 59e4e58683 Add trace logging to AllocationDeciders if decision is NO() 2013-12-13 12:08:26 +01:00
Sebastian Geidies 6ed126deaf Skipping execution of remaining Deciders if one of them returns a Decision.NO.
Reordering execution of the different AllocationDeciders, so the cheapest get executed first.
2013-12-13 11:52:48 +01:00
Boaz Leskes 2acccf257d Add `queries` to XContent output of PercolateStats
The queries stats tracked but not exposed to the Rest API

Closes #4440
2013-12-13 11:36:51 +01:00
Boaz Leskes b65d07b495 A failure during the response construction could cause a Node Operation never to return 2013-12-13 10:36:39 +01:00
Diego Ongaro a4814c2f69 Print nice error in bin/elasticsearch if user needs to run maven
Before, people that cloned the repo and expected to be able to run
bin/elasticsearch would be met with an awful shell error: the shell
interprets Maven variables like ${project.build.finalName} as shell
variables yet can't handle names of the form ${x.y}. This commit
explicitly checks to make sure that Maven has done its substitutions
before continuing; if Maven hasn't been run, it gives a helpful error
message.

Fixes #2954.
2013-12-13 10:30:42 +01:00
Shay Banon 976bdd6a26 randomize transport tcp compression on nodes 2013-12-12 23:19:59 +01:00
Shay Banon 0469cca4be properly support global transport compression with new bytes transport request optimization 2013-12-12 22:29:54 +01:00
Shay Banon 0f4d81fcd4 refresh the mapping source directly into a compressed buffer
instead of building the mapping source, and then compressing it, we can generate it directly into a compressed buffer
2013-12-12 20:58:11 +01:00
Lee Hinman 77fcf71338 Add new `simple_query_string` query type
This adds support for Lucene's SimpleQueryParser by adding a new type
of query called the `simple_query_string`. The `simple_query_string`
query is designed to be able to parse human-entered queries without
throwing any exceptions.

Resolves #4159
2013-12-12 12:09:32 -07:00
Alexander Reelsen 348c3731c8 Fixing debian init script to work on ubuntu LTS
sysctl parameters must be separated like `-q -w` instead of `-qw`
2013-12-12 17:57:34 +01:00
Adrien Grand e2e19203d7 Remove IndexFieldData.getHighestNumberOfSeenUniqueValues().
Closes #4426
2013-12-12 15:44:05 +01:00
Shay Banon f0e1f9215b try and wait better for all mapping updates to be processes in test 2013-12-12 15:06:37 +01:00
Simon Willnauer 198d36dc15 Also wrap IndexInput if CFS is used 2013-12-12 12:14:47 +01:00
Simon Willnauer d95420cc67 Add more information to IndexInput failures related to abusing closed input 2013-12-12 10:44:01 +01:00
Adrien Grand 0554f8e875 Add missing mappers to MapperBuilders.
- completion
 - geo_point
 - geo_shape
 - parent
 - size
 - ttl

Close #4423
2013-12-12 09:44:55 +01:00
Martijn van Groningen b4d1d899d2 Replaced the synchronization method for enabling the realtime percolator from synchronized methods to use AtomicBoolean#compareAndSet instead.
Remove @TestLogging from percolator tests.
2013-12-11 22:54:35 +01:00
Luca Cavanna 2cbecd9cb3 Made sure that we never throw IndexMissingException in indices query and filter
It could happen although we internally use IgnoreIndices.MISSING, due to MetaData#concreteIndices contract, which throws IndexMissingException anyway if all requested indices are missing.
In case all the indices specified in the query/filter are missing, we just execute the no_match query/filter, no need to throw any error.

Closes #3428
2013-12-11 22:26:46 +01:00
Luca Cavanna 24434063b6 Introduced ok & acknowledged constant in AcknowledgedRestResponseActionListener 2013-12-11 21:28:54 +01:00
Luca Cavanna b1fa147968 More common AcknowledgedRestResponseActionListener
Introduced use of AcknowledgedRestResponseActionListener in put/delete alias & delete index
2013-12-11 21:28:15 +01:00
Luca Cavanna 037bf6a85f Unified default ack timeout to 30 seconds
Increased also default publish state timeout to 30 seconds (from 5 seconds) and introduced constant for it.
Introduced AcknowledgedRequest.DEFAULT_ACK_TIMEOUT constant.
Removed misleading default values coming from the REST layer.
Removed (in a bw compatible manner) the timeout support in put/delete index template as the timeout parameter was ignored.

Closes #4395
2013-12-11 20:54:27 +01:00
Martijn van Groningen f9ff733eb8 Renamed the methods in DocumentListenerType to actually reflect when these are invoked. 2013-12-11 17:51:09 +01:00
Martijn van Groningen 92c32dca9e Invoke the DocumentType listeners *before* the mappers are updated. This fixes an issue where if two or more concurrent percolate index requests are processed, the first request would the `.percolator` type mapping, but the real time percolator listener wouldn't be active, this would result in that the subsequent concurrent requests wouldn't be parsed and kept in memory and would never be included in any percolate api result. This issue any occurred when `.percolator` type is created on the fly.
Also made the call to PercolatorQueriesRegistry#enableRealTimePercolator and #disableRealTimePercolator synchronized, so that for the same shard the RealTimePercolatorOperationListener can't registered twice.
2013-12-11 17:41:10 +01:00
Shay Banon a3f1c428c2 bulk response has errors indication + status per item
closes #4002
2013-12-11 16:04:41 +01:00
Shay Banon 10cdb0ae22 Batch processing mapping updates can cause missed merged mappings when batching multiple types
when we bulk changes, we need to use the same index metadata builder across the tasks, otherwise we might remove mappings erroneously
 also, when we check if we can use a higher order mapping, we need to verify that its for the same mapping type
2013-12-11 14:34:59 +01:00
Martijn van Groningen a760f1f54a Make listeners a final field in ShardIndexingService, which fixed possible visibility issue. 2013-12-11 12:22:45 +01:00
Shay Banon aee388ec46 introduce an internal metadata uuid 2013-12-11 10:49:36 +01:00
Florian Schilling 937a4e9d9d SloppyMath
Added copy of SloppyMath.java from lucene 4.6+
and setup GeoDistance for new haversin method

closes #3862
2013-12-11 17:51:32 +09:00