Commit Graph

13850 Commits

Author SHA1 Message Date
Christoph Büscher 9fd61f786e Tests: Fix RangeQueryBuilderTest, adding separate test for unmapped field & timestamp 2015-06-12 12:21:44 +02:00
Colin Goodheart-Smithe a216062d88 Aggregations: allow users to perform simple arithmetic operations on histogram aggregations
Closes #11029
2015-06-12 09:25:52 +01:00
Boaz Leskes df8a3006fc Merge pull request #11615 from bleskes/async_fetch_non_existent_nodes
Internal: AsyncShardFetch can hang if there are new nodes in cluster state
2015-06-12 09:57:25 +02:00
Robert Muir b2ced13f3d Tests: fix test bugs so tests pass on IBM J9 (at least once) 2015-06-12 01:11:32 -04:00
Christoph Büscher b8dd7e688e Tests: Fix ExistsQueryBuilderTest after changes to builder merged in from master 2015-06-12 00:11:56 +02:00
Boaz Leskes 532fa0663b Internal: AsyncShardFetch can hang if there are new nodes in cluster state
The AsyncShardFetch retrieves shard information from the different nodes in order to detirment the best location for unassigned shards. The class uses TransportNodesListGatewayStartedShards and TransportNodesListShardStoreMetaData in order to fetch this information. These actions, inherit from TransportNodesAction and are activated using a list of node ids. Those node ids are extracted from the cluster state that is used to assign shards.

If we perform a reroute and adding new news in the same cluster state update task, it is possible that the AsyncShardFetch administration is based on
a different cluster state then the one used by TransportNodesAction to resolve nodes. This can cause a problem since TransportNodesAction filters away unkown nodes, causing the administration in AsyncShardFetch to get confused.

This commit fixes this allowing to override node resolving in TransportNodesAction and uses the exact node ids transfered by AsyncShardFetch
2015-06-11 23:16:09 +02:00
Christoph Büscher a125a31dfb Tests: Mark ExitsQueryTests as @AwaitsFix. 2015-06-11 22:53:44 +02:00
Igor Motov 93beea1f67 Snapshot/Restore: Move in-progress snapshot and restore information from custom metadata to custom cluster state part
Information about in-progress snapshot and restore processes is not really metadata and should be represented as a part of the cluster state similar to discovery nodes, routing table, and cluster blocks. Since in-progress snapshot and restore information is no longer part of metadata, this refactoring also enables us to handle cluster blocks in more consistent manner and allow creation of snapshots of a read-only cluster.

Closes #8102
2015-06-11 15:21:18 -04:00
Simon Willnauer 440580dd55 Cleanup MergeScheduler infrastrucutre
This commit cleans up all the MergeScheduler infrastructure
and simplifies / removes all unneeded abstractions. The MergeScheduler
itself is now private to the Engine and all abstractions like Providers
that had support for multiple merge schedulers etc. are removed.

Closes #11602
2015-06-11 20:49:42 +02:00
Lee Hinman 483a15a12b Use task's class name if not a TimedPrioritizeRunnable
This is helpful to track down the origin of pending_tasks that aren't
expected. In tests we catch this with an assert, but in production
asserts may not be enabled so we should at least add the class name.
2015-06-11 12:39:24 -06:00
Christoph Büscher 82cb0e66b4 Reverting previous commit 2015-06-11 19:32:21 +02:00
Shaunak Kashyap acfb3196f4 Removing top-level filter parameter from search API 2015-06-11 09:40:31 -07:00
Christoph Büscher 2a468fdcd3 Merge pull request #11607 from cbuescher/feature/query-refactoring-rangequery-fix
Fixing edge case in RangeQueryBuilder when using time zone
2015-06-11 18:24:02 +02:00
Christoph Büscher 78eaffb646 Fixing edge case in RangeQueryBuilder when using time zone
When specifying a time zone, RangeQueryBuilder currently throws an
exeption when the field does not use DateFieldMapper, but if there
are no mappers at all for that field it doesn't complain. To be
consistent we also throw expection now.
2015-06-11 18:09:04 +02:00
Clinton Gormley 1528b86b29 Merge pull request #11575 from skearns64/aspire-doc
Add Aspire for Elasticsearch to integrations page
2015-06-11 15:04:04 +02:00
Christoph Büscher bd2e1632de Merge pull request #11427 from cbuescher/feature/query-refactoring-exists
Query Refactoring: ExistsQueryBuilder and Parser
2015-06-11 14:47:08 +02:00
Christoph Büscher c928852d4a Query Refactoring: ExistsQueryBuilder and Parser
Refactors ExistsQueryBuilder and Parser, splitting the parse() method into a parsing
and a query building part. Also moving newFilter() utility method from parser to query builder.

Changes in the BaseQueryTestCase include introduction of randomized version to test disabled
FieldNamesFieldMappers and also getting rid of the need for createEmptyBuilder() method by
using registered prototype constants.

Relates to #10217
Closes #11427
2015-06-11 14:40:21 +02:00
Clinton Gormley 0216dfd3b6 Docs: Removed left over table header from merge.asciidoc 2015-06-11 13:26:34 +02:00
Christoph Büscher 4f4b1b74df Merge pull request #11121 from cbuescher/feature/query-refactoring-boolquery
Query refactoring: BoolQueryBuilder and Parser
2015-06-11 13:04:23 +02:00
Simon Willnauer b0fe0096c4 [TEST] Prevent merges from being kicked off after two docs 2015-06-11 12:49:56 +02:00
Christoph Büscher 458d62e4a0 Refactors BoolQueryBuilder and Parser. Splits the parse(QueryParseContext ctx) method into a parsing
and a query building part, adding NamedWriteable implementation for serialization and hashCode(),
equals() for testing.

This change also adds tests using fixed set of leaf queries (Terms, Ids, MatchAll) as nested Queries in test query setup.
Also QueryParseContext is adapted to return QueryBuilder instances for inner filter parses instead of
previously returning Query instances, keeping old methods in place but deprecating them.

Relates to #10217
Closes #11427
2015-06-11 12:42:30 +02:00
Simon Willnauer f77804dad3 Bake in TieredMergePolicy
Today we provide the ability to plug in MergePolicy and
we provide the once lucene ships with. We do not recommend to change
the default and even only a small number of expert users would ever touch
this. This commit removes the ancient log byte size and log doc count
merge policy providers, simplifies the MergePolicy wiring and makes the
tiered MP the one and only default. All notions of a merge policy has been
removed from the docs and should be deprecated in the previous version.

Closes #11588
2015-06-11 11:58:30 +02:00
javanna 22c5205e67 Merge branch 'master' into feature/query-refactoring 2015-06-11 09:59:54 +02:00
Britta Weber e7a99501b0 [TEST] remove node from nodes list if disruption is removed from node
If we don't remove the node from the nodes list then later clearDisruption might fail
in case we shut down the node before.
2015-06-11 09:08:10 +02:00
Boaz Leskes 134d898be9 Test: added awaitFix to AzureTwoStartedNodesTest.two_nodes_should_run_using_private_ip 2015-06-11 08:59:44 +02:00
Ryan Ernst d372bf7d7a Merge pull request #11586 from rjernst/fix/field-names-null
Mappings: Shortcut exists and missing queries when no types/docs exist
2015-06-10 14:58:57 -07:00
Clinton Gormley 6e71f60b82 Update bool-query.asciidoc
Emphasise section about using bool query in filter context
2015-06-10 21:46:23 +02:00
Simon Willnauer 657d6dd9cf Remove MergeScheduler pluggability
Nobody should really plug in a different merge scheduler for elasticsearch.
This is too expert and might cause catastrophic failures.
2015-06-10 20:28:30 +02:00
Boaz Leskes 650950c7f4 Merge pull request #11583 from bleskes/mapper_exception_unwrap
Recovery: Fix MapperException detection during translog ops replay
2015-06-10 19:06:53 +02:00
Ryan Ernst de4295cd7f Mappings: Shortcut exists and missing queries when no types/docs exist
There used to be a null check for _field_names mapper not existing. This
was recently removed. However, there is a corner case when the mapper
may be missing: when no types or docs exist at all in the index.

This change adds back a null check and just returns no docs.
2015-06-10 09:51:43 -07:00
Igor Motov 831cfa52d5 Snapshot/Restore: change metadata file format 2015-06-10 11:13:32 -04:00
Boaz Leskes e9d275d3a9 Recovery: fix MapperException detection during translog ops replay
The current ExceptionsHelper.unwrapCause(exception) requires the incoming exception to support ElasticsearchWrapperException , which TranslogRecoveryPerformer.BatchOperationException doesn't implement. I opted for a more generic solution
2015-06-10 17:12:14 +02:00
Boaz Leskes 5951f2580d Merge pull request #11576 from bleskes/wait_on_mapping_remove
Test: rename waitForConcreteMappingsOnAll & waitForMappingOnMaster to assertConcreteMappingsOnAll & assertMappingOnMaster
2015-06-10 14:37:59 +02:00
Steve Kearns 39acd7c170 Add Aspire for Elasticsearch to integrations page
Add Aspire for Elasticsearch to the integrations page, and add two missing colons to other integrations.
2015-06-10 08:12:11 -04:00
Adrien Grand 199c9002e5 Merge pull request #11428 from jpountz/fix/CompressedXConten_fast
Make CompressedXContent.equals fast again.
2015-06-10 13:38:06 +02:00
Adrien Grand fbe617c37b Internal: Make CompressedXContent.equals fast again.
We had to make CompressedXContent.equals decompress data to fix some
correctness issues which had the downside of making equals() slow. Now we store
a crc32 alongside compressed data which should help avoid decompress data in
most cases.

Close #11247
2015-06-10 13:37:08 +02:00
Boaz Leskes 356f0ffde2 Test: rename waitForConcreteMappingsOnAll & waitForMappingOnMaster to assertConcreteMappingsOnAll & assertMappingOnMaster
Now that mapping updates are sync and done before indexing we don't really need the waiting component. Also, removed many places were they were used as safe guard against delayed mapping updates, which are now not needed.
2015-06-10 13:27:57 +02:00
javanna ff9041dc48 Transport: allow to de-serialize arbitrary objects given their name
As part of the query refactoring, we want to be able to serialize queries by having them extend Writeable, rather than serializing their json. When reading them though, we need to be able to identify which query we have to create, based on its name.

For this purpose we introduce a new abstraction called NamedWriteable, which is supported by StreamOutput and StreamInput through writeNamedWriteable and readNamedWriteable methods. A new NamedWriteableRegistry is introduced also where named writeable prototypes need to be registered so that we are able to retrieve the proper instance of query given its name and then de-serialize it calling readFrom against it.

Closes #11553
2015-06-10 12:46:31 +02:00
Adrien Grand ac7ce2b899 Rivers removal.
While we had initially planned to keep rivers around in 2.0 to ease migration,
keeping support for rivers is challenging as it conflicts with other important
changes that we want to bring to 2.0 like synchronous dynamic mappings updates.
Nothing impossible to fix, but it would increase the complexity of how we
deal with dynamic mappings updates and manage rivers, while handling dynamic
mappings updates correctly is important for resiliency and rivers are on the go.
So removing rivers in 2.0 may well be a better trade-off.
2015-06-10 09:22:09 +02:00
javanna 5f66f68135 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/RangeQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/SpanTermQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/TermQueryParser.java
2015-06-10 09:09:43 +02:00
Ryan Ernst 49bef19878 Merge pull request #11565 from rjernst/remove/field-mapper-wrappers
Mappings: Remove leftover sugar methods from FieldMapper
2015-06-09 14:12:08 -07:00
Ryan Ernst 6c73647325 Mappings: Remove leftover sugar methods from FieldMapper
These methods are now all in MappedFieldType. This removes the remaining
callers of the methods on FieldMapper, and cuts down the FieldMapper
API to no longer include them.
2015-06-09 14:02:06 -07:00
Honza Král 09b5f90779 [API] correct link for flush_synced docs 2015-06-09 21:29:02 +02:00
Simon Willnauer 63ed54017e [TEST] Remove deprecated API 2015-06-09 20:43:01 +02:00
Ryan Ernst 9d57818cee fix field names to be disabled again pre 1.3 2015-06-09 11:42:06 -07:00
Simon Willnauer b0466bbacd [TEST] Add simple test for selecting fiels to be included in mlt query 2015-06-09 20:16:47 +02:00
Ryan Ernst 9fa69bd663 Merge pull request #11559 from rjernst/pr/field-type-users
Mappings: Make index level mapping apis use MappedFieldType
2015-06-09 11:04:33 -07:00
Ryan Ernst 1fdae75025 Mappings: Make index level mapping apis use MappedFieldType
The MapperService is the "index wide view" of mappings. Methods on it
are used at query time to lookup how to query a field. This
change reduces the exposed api so that any information returned
is limited to that api exposed by MappedFieldType. In the future,
MappedFieldType will be guaranteed to be the same across all
document types for a given field.

Note CompletionFieldType needed some more settings moved to it. Other
than that, this change is almost purely cosmetic.
2015-06-09 10:04:28 -07:00
Ryan Ernst 9787266b60 Merge pull request #11544 from rjernst/refactor/null-value
Mapping: Move null value handling into MappedFieldType
2015-06-09 09:46:56 -07:00
Ryan Ernst bf805168e9 Merge branch 'master' into refactor/null-value 2015-06-09 09:46:19 -07:00