Commit Graph

11704 Commits

Author SHA1 Message Date
Robert Muir aade6194b7 Add span within/containing queries.
Expose new span queries from https://issues.apache.org/jira/browse/LUCENE-6083

Within returns matches from 'little' that are enclosed inside of a match from 'big'.
Containing returns matches from 'big' that enclose matches from 'little'.
2015-04-30 23:31:31 -04:00
Jack Conradson aa968f6b65 Scripting: Add Field Methods
Added infrastructure to allow basic member methods in the expressions
language to be called.  The methods must have a signature with no arguments.  Also
added the following member methods for date fields (and it should be easy to add more)
* getYear
* getMonth
* getDayOfMonth
* getHourOfDay
* getMinutes
* getSeconds

Allow fields to be accessed without using the member variable [value].
(Note that both ways can be used to access fields for back-compat.)

closes #10890
2015-04-30 15:36:46 -07:00
Ryan Ernst d2b12e4fc2 Mappings: Remove docs for type level analyzer defaults
These settings were removed in #9430.
2015-04-30 13:57:55 -07:00
Ryan Ernst 4ef9f3ca63 Mappings: Remove file based default mappings
Using files that must be specified on each node is an anti-pattern
from the API based goal of ES. This change removes the ability
to specify the default mapping with a file on each node.

closes #10620
2015-04-30 13:50:35 -07:00
Ryan Ernst a0451a37cc Upgrade lucene snapshot to r1677039 2015-04-30 13:43:19 -07:00
Adrien Grand 12c19508fb Tests: Fix test bug in aggregations' EquivalenceTests due to the change of the default min_doc_count. 2015-04-30 19:14:56 +02:00
Martijn van Groningen 7a6fe809d0 inner_hits: Don't use bitset cache for children filters.
Only parent filters should use bitset filter cache, to avoid memory being wasted.
Also in case of object fields inline the field name into the nested object,
instead of creating an additional (dummy) nested identity.

Closes #10662
Closes #10629
2015-04-30 16:56:43 +02:00
Adrien Grand 82ad074dfe Merge pull request #10904 from jpountz/enhancement/histogram_min_doc_count_0
Aggs: Change the default `min_doc_count` to 0 on histograms.
2015-04-30 15:54:02 +02:00
Adrien Grand e5be85d586 Aggs: Change the default `min_doc_count` to 0 on histograms.
The assumption is that gaps in histogram are generally undesirable, for instance
if you want to build a visualization from it. Additionally, we are building new
aggregations that require that there are no gaps to work correctly (eg.
derivatives).
2015-04-30 15:48:23 +02:00
Colin Goodheart-Smithe 969f53e399 fix typo in Min bucket aggregation docs 2015-04-30 14:41:01 +01:00
Colin Goodheart-Smithe d16bf992a9 Aggregations: min_bucket aggregation
An aggregation to calculate the minimum value in a set of buckets.

Closes #9999
2015-04-30 13:34:21 +01:00
javanna 77ac4528fb Transport: read/writeGenericValue to support BytesRef
Add support for BytesRef to existing StreamInput#readGenericValue and StreamOutput#writeGenericValue

Closes #10878
2015-04-30 10:59:01 +02:00
Ryan Ernst 2fd387d378 fix dumb test copy/paste mistake 2015-04-29 23:33:43 -07:00
Ryan Ernst 79a1c38ed6 Mappings: Fix _field_names to not have doc values
When doc values were turned on a by default, most meta fields
had it explicitly disabled.  However, _field_names was missed.
This change forces doc values to be off always for _field_names
and removes the unnecessary support when creating index fields.

closes #10892
2015-04-29 23:12:16 -07:00
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
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
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
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
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