Commit Graph

11744 Commits

Author SHA1 Message Date
Zachary Tong 351a4d3315 [DOCS] Fix movavg images and naming 2015-04-29 13:33:54 -04:00
Igor Motov 8e5543dea0 Test: ignore cluster state differences on the nodes that disconnected from the master 2015-04-29 12:49:41 -04:00
Igor Motov bac135261c Test: make sure that tests are not affected by changing in address resolution settings 2015-04-29 12:49:40 -04:00
Igor Motov 38be1e8a1a Test: remove reference to the local node before comparing cluster states in ensureClusterStateConsistency 2015-04-29 12:49:40 -04:00
Simon Willnauer 9828e955f3 [TEST] enable host name resolving to gain consistent transport addresses in clusterstate 2015-04-29 12:49:40 -04:00
Simon Willnauer 58eed45ee5 [TEST] Move XContentTestUtils.java into o.e.test folder
Classes referenced by the Test base classes must be under this
package otherwise the test jar can't be used in a 3rd party application.
2015-04-29 12:49:40 -04:00
Igor Motov 478c253f89 Add support for cluster state diffs
Adds support for calculating and sending diffs instead of full cluster state of the most frequently changing elements - cluster state, meta data and routing table.

Closes #6295
2015-04-29 12:49:40 -04:00
Lee Hinman 6e1c995741 Clarify logging about disk thresholds in DiskThresholdDecider 2015-04-29 10:43:00 -06:00
David Pilato 3c3e9b63a7 fix: query string time zone not working
If you define exactly the same date range query using either `DATE+0200` notation or `DATE` and set `timezone: +0200`, elasticsearch gives back different results:

```
DELETE foo
PUT /foo
{
  "mapping": {
    "tweets": {
      "properties": {
        "tweet_date": {
          "type": "date"
        }
      }
    }
  }
}

POST /foo/tweets/1/
{
  "tweet_date": "2015-04-05T23:00:00+0000"
}
POST /foo/tweets/2/
{
  "tweet_date": "2015-04-06T00:00:00+0000"
}

GET /foo/tweets/_search?pretty
{
    "query": {
        "query_string": {
            "query": "tweet_date:[2015-04-06T00:00:00+0200 TO 2015-04-06T23:00:00+0200]"
        }
    }
}
GET /foo/tweets/_search?pretty
{
    "query": {
        "query_string": {
            "query": "tweet_date:[2015-04-06T00:00:00 TO 2015-04-06T23:00:00]",
            "time_zone": "+0200"
        }
    }
}
```

This PR fixes it and will also allow us to add the same feature to simple_query_string as well in another PR.

Closes #10477.

(cherry picked from commit 880f4a0)
2015-04-29 18:10:02 +02:00
Simon Willnauer d4463602f6 [TEST] Use a high shard delete timeout when clusterstates are delayed
`IndiceStore#indexCleanup` uses a disruption scheme to delay cluster state
processing. Yet, the delay is [1..2] seconds but tests are setting the shard
deletion timeout to 1 second to speed up tests. This can cause random not
reproducible failures in this test since the timeouts and delays are bascially
overlapping. This commit adds a longer timeout for this test to prevent these
problems.
2015-04-29 17:51:21 +02:00
Colin Goodheart-Smithe 02c0cdff0a Aggregations: Ability to perform computations on aggregations
Adds a new type of aggregation called 'reducers' which act on the output of aggregations and compute extra information that they add to the aggregation tree. Reducers look much like any other aggregation in the request but have a buckets_path parameter which references the aggregation(s) to use.

Internally there are two types of reducer; the first is given the output of its parent aggregation and computes new aggregations to add to the buckets of its parent, and the second (a specialisation of the first) is given a sibling aggregation and outputs an aggregation to be a sibling at the same level as that aggregation.

This PR includes the framework for the reducers, the derivative reducer (#9293), the moving average reducer(#10002) and the maximum bucket reducer(#10000). These reducer implementations are not all yet fully complete.

Known work left to do (these points will be done once this PR is merged into the master branch):

Add x-axis normalisation to the derivative reducer
Add lots more JUnit tests for all reducers
Contributes to #9876
Closes #10002
Closes #9293
Closes #10000
2015-04-29 16:35:49 +01:00
Colin Goodheart-Smithe 0589adb8b4 Merge branch 'master' into feature/aggs_2_0
# Conflicts:
#	src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
2015-04-29 16:32:05 +01:00
javanna eb44e950d4 Java Api: remove unused private static class PartialField from SearchSourceBuilder
Partial fields have been removed from master a while ago, this is a leftover.
2015-04-29 17:26:32 +02:00
Colin Goodheart-Smithe 88aa8934a3 Merge branch 'master' into feature/aggs_2_0 2015-04-29 16:10:19 +01:00
Britta Weber a202c2a434 Revert "Write state also on data nodes if not master eligible"
This reverts commit 4088dd38cb.
2015-04-29 17:07:07 +02:00
Colin Goodheart-Smithe a33e77ff96 Muted intermittently failing tests
To reproduce the failures use `-Dtests.seed=D9EF60095522804F`
2015-04-29 16:04:29 +01:00
Igor Motov 9b76be92b3 Docs: add notes about using close and awaitClose with bulk processor
Closes #10839
2015-04-29 10:53:16 -04:00
Colin Goodheart-Smithe 57a8885964 Merge branch 'master' into feature/aggs_2_0
# Conflicts:
#	src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java
#	src/main/java/org/elasticsearch/search/aggregations/AggregationModule.java
#	src/main/java/org/elasticsearch/search/aggregations/AggregatorFactories.java
#	src/main/java/org/elasticsearch/search/aggregations/AggregatorParsers.java
#	src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java
#	src/main/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregator.java
#	src/main/java/org/elasticsearch/search/aggregations/metrics/InternalNumericMetricsAggregation.java
#	src/test/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregatorTest.java
2015-04-29 15:49:41 +01:00
Robert Muir 9dec558ea1 nuke more cwd usage 2015-04-29 10:43:11 -04:00
markharwood 528f6481ea Query enhancement: return positions of parse errors found in JSON
Extend SearchParseException and QueryParsingException to report position information in query JSON where errors were found. All query DSL parser classes that throw these exception types now pass the underlying position information (line and column number) at the point the error was found.

Closes #3303
2015-04-29 15:02:46 +01:00
Adrien Grand 6e076efdb9 Docs: Add documentation for the `doc_values` setting on the `boolean` field type.
Close #10431
2015-04-29 15:59:24 +02:00
Colin Goodheart-Smithe 3bb8ff2a92 fixed issue with eggs in percolation request for 1 shard 2015-04-29 14:55:20 +01:00
javanna 1d4df4b628 [TEST] remove source parameter validation from REST tests runner
source parameter is implicitly supported and doesn't need to be declared in rest spec. It is tested though, as every api that supports get with body can also get requests using POST with body or get with source query_string parameter.
2015-04-29 15:44:43 +02:00
Robert Muir c0587cb244 fix CWD usage in analysis tests 2015-04-29 09:44:37 -04:00
Britta Weber 4088dd38cb Write state also on data nodes if not master eligible
When a node was a data node only then the index state was not written.
In case this node connected to a master that did not have the index
in the cluster state, for example because a master was restarted and
the data folder was lost, then the indices were not imported as dangling
but instead deleted.
This commit makes sure that index state for data nodes is also written
if they have at least one shard of this index allocated.

closes #8823
closes #9952
2015-04-29 15:27:21 +02:00
Robert Muir 6bd69b74f1 Merge branch 'master' into die_cwd_die 2015-04-29 09:15:18 -04:00
Adrien Grand ccca0386ef Other indentation fixes 2015-04-29 15:14:23 +02:00
Clinton Gormley 7aa4c7e256 Docs: Removed a reference to index_name from the array mapping page 2015-04-29 15:12:31 +02:00
Robert Muir a7d16a1dd1 first strike against crazy CWD usages 2015-04-29 09:10:19 -04:00
Adrien Grand 891dfee0d6 Fix some indentation issues. 2015-04-29 15:06:58 +02:00
Antonio Bonuccelli ab83eb036b Docs: adding missing single quote on PUT index request
Closes #10876
2015-04-29 14:45:25 +02:00
Clinton Gormley ad813c02cb Docs: Add a Requirements section to the README mentioning recent Java
Closes #10858
2015-04-29 14:32:16 +02:00
Honza Král 28e5a649b4 [API] remove global parameter source from individual APIs
Same way we don't define pretty anywhere, we shouldn't have source
2015-04-29 14:01:47 +02:00
Shay Banon c55818fa2d Merge pull request #10873 from kimchy/remove_preconditions
Remove Preconditions class
2015-04-29 12:55:23 +02:00
Simon Willnauer 94d8b20611 Add multi data.path to migration guide
this commit removes the obsolete settings for distributors and updates
the documentation on multiple data.path. It also adds an explain to the
migration guide.

Relates to #9498
Closes #10770
2015-04-29 11:51:37 +02:00
Shay Banon 11bf7074d7 Remove Preconditions class
We don't need our own anymore, since we removed the Elasticsearch illegal argument exception
2015-04-29 11:37:32 +02:00
Simon Willnauer 32759398a5 added missing { 2015-04-29 10:53:33 +02:00
Simon Willnauer b4efb6c472 Remove unused / obsolete import and throws statements
This commit removes unused thorws statements when RuntimeExceptions are
mentioned in the throws statement. It also removes obsolete import statements
for java.lang.IllegalArgumentException and java.lang.IllegalStateException
2015-04-29 10:42:31 +02:00
Simon Willnauer 4f14af21c5 Remove ElasticsearchIAE and ElasticsearchISE
This commit removes ElasticsearchIAE and ElasticsearchISE in favor of
the JDKs IAE and ISE.

Closes #10794
2015-04-29 10:42:31 +02:00
Michael McCandless ab11be55a2 add another delete-by-query deprecation 2015-04-29 04:39:41 -04:00
Adrien Grand c23d550823 Merge pull request #10856 from jpountz/fix/remove_qparser_cache
Internal: Remove the query parser cache.
2015-04-29 09:45:51 +02:00
Simon Willnauer f18f623878 [TEST] Remove searchers from tracking map once they are closed 2015-04-29 09:33:20 +02:00
Ryan Ernst bf09e58cb3 Mappings: Remove includes and excludes from _source
Regardless of the outcome of #8142, we should at least enforce that
when _source is enabled, it is sufficient to reindex. This change
removes the excludes and includes settings, since these modify
the source, causing us to lose the ability to reindex some fields.

closes #10814
2015-04-28 15:03:51 -07:00
Ryan Ernst 99584deae8 Mappings: Consolidate document parsing logic
The code to parse a document was spread across 3 different classes,
and depended on traversing the ObjectMapper hiearchy. This change
consolidates all the doc parsing code into a new DocumentParser.
This should allow adding unit tests (future issue) for document
parsing so the logic can be simplified.  All code was copied
directly for this change with only minor modifications to make
it work within the new location.

closes #10802
2015-04-28 14:51:47 -07:00
Ryan Ernst f6d8b12796 Mappings: Explicitly disallow multi fields from using object or nested fields
Multi fields currently parse any field type passed in.  However, they
were only intended to support copying simple values from the outter
field. This change adds validation to ensure object and nested
fields are not used within multi fields.

closes #10745
2015-04-28 14:39:39 -07:00
Shay Banon 3daf460acb Merge pull request #10861 from kimchy/remove_indices_replication
Remove index/indices replication infra code
2015-04-28 22:54:50 +02:00
Shay Banon 0a61d03ea2 Remove index/indices replication infra code
now that delete by query is out, we don't need this infrastructure code. The delete by query will be implenented as a plugin, with scan scroll + bulk delete, so it will not need this infra anyhow
2015-04-28 22:49:49 +02:00
Michael McCandless cf2fb4ed0f Remove core delete-by-query implementation, to be replaced with a plugin
The current implementation is dangerous: it unexpectedly refreshes,
which can quickly cause an unhealthy index (segment explosion).  It
can also delete different documents on primary vs replicas, causing
inconsistent replicas.

For 2.0 we will replace this with an optional plugin that does a
scan/scroll search and then issues bulk delete requests.

Closes #10859
2015-04-28 16:09:04 -04:00
Boaz Leskes 7d8f39fc27 Discovery: Unicast Ping should close temporary connections after returning ping results
During pinging we open light , temporary connections to the the unicast hosts. After the pinging is done we close those. At the moment we do so before returning the results of the pings to the caller. On the other hand, in our transport logic we acquire a lock specific to the node id while opening a connection. When disconnecting from node, we have to acquire the same lock in order to guarantee the the connection opening has finished. This can cause big delays in environments where opening a connection is very slow, as the connection closing has to wait *after* the pinging was done.. This can be problematic as  it causes master election to use stale data.

Closes #10849
2015-04-28 22:32:47 +03:00
Simon Willnauer c0d3205146 Fix more download URLs 2015-04-28 20:40:14 +02:00