Commit Graph

4708 Commits

Author SHA1 Message Date
Nicholas Knize 7112827dd2 remove unknown javadoc tag 2016-04-11 20:52:12 -05:00
Adrien Grand 496c7fbd84 Upgrade Lucene 6 Release
* upgrades numerics to new Point format
* updates geo api changes
  * adds GeoPointDistanceRangeQuery as XGeoPointDistanceRangeQuery
  * cuts over to ES GeoHashUtils
2016-04-11 16:50:04 -05:00
Adrien Grand 0eb1a816c8 Allow the query cache to be disabled. #16268
This replaces the internal `index.queries.cache.type` setting with
a new `index.queries.cache.enabled` setting, which is documented.

Closes #15802
2016-04-11 18:06:16 +02:00
Adrien Grand 13c1efd4d1 Propagate DocValueFormat to all terms aggs. #17646
TL;DR This commit should not have any impact on terms aggs, it will just make
supporting ipv6 easier.

Currently only the numeric terms aggs propagate the DocValueFormat instance since
we use numerics to represent also dates or ip addresses. Since string terms aggs
are only used for text/keyword/string fields, they do not use the format and just
call toUt8String(). However when we support ipv6, ip addresses as well will be
encoded in sorted doc values (just like strings) so we will need to use the
DocValueFormat to format the keys.
2016-04-11 16:33:19 +02:00
Alexander Reelsen 9fc4ce294a Tests: Fixing SimulateProcessorResultTests due to recent ingest attachment changes 2016-04-11 15:52:22 +02:00
Alexander Reelsen da19ddf3e6 Ingest Attachment: Allow to prevent base64 conversions by using raw bytes (#16601)
CBOR is natively supported in Elasticsearch and allows for byte arrays.
This means, that by using CBOR the user can prevent base64 conversions
for the data being sent back and forth.

This PR adds support to extract data from a byte array in addition to
a string. This also required to add a ByteArrayValueSource class.
2016-04-11 14:14:56 +02:00
Jim Ferenczi 2713a08fb3 Merge pull request #17613 from jimferenczi/all_field
Simplify AllEntries, AllField and AllFieldMapper
2016-04-11 12:13:48 +02:00
Daniel Mitterdorfer 0cdea41bf5 Turn RestChannel into an interface
In #17133 we introduce request size limit handling and need a custom
channel implementation. In order to ensure we delegate all methods
it is better to have this channel implement an interface instead of
an abstract base class (so changes on the interface turn into
compile errors).

Relates #17133
2016-04-11 11:06:39 +02:00
David Pilato 1e346d1ac1 Merge branch 'fix/17625-close-ingest-factory' 2016-04-11 10:00:19 +02:00
David Pilato cc4fb61a38 Simplify the test 2016-04-11 09:59:13 +02:00
Nik Everett 525ce40d1c Give SearchContext a toString
and move the string capturing to capture time.
2016-04-10 20:55:31 -04:00
Nik Everett ac94e5f287 Provide more information about open contexts
Sometimes we get a test failure caused by search contexts left open.
The tests include a stack trace of the call that opened the context
but nothing else about the context. This adds more information about
the context that has been left open like what query it was running,
what shard it targeted, and whether or not it was a scroll.

Relates to #17582
2016-04-10 20:55:31 -04:00
David Pilato 24f48b86b5 Update after review and add a Test 2016-04-09 13:14:25 +02:00
Jason Tedor 4ff8f5c16c Revert "Exploit DiscoveryNode immutability..."
This reverts commit e76038e076.
2016-04-08 19:29:55 -04:00
Adrien Grand 4adc31fe11 Use `mmapfs` by default.
I case any problem was discovered, you can still enable the legacy `default`
directory instead. But the plan is to get rid of it in 6.0.

Closes #16983
2016-04-08 20:23:27 +02:00
David Pilato 09fc9485c6 Ingest does not close its factories
When you implement an ingest factory which implements `Closeable`:

```java
public static final class Factory extends AbstractProcessorFactory<MyProcessor> implements Closeable {
    @Override
    public void close() throws IOException {
        logger.debug("closing my processor factory");
    }
}
```

The `close()` method is never called which could lead to some leak threads when we close a node.

The `ProcessorsRegistry#close()` method exists though and seems to do the right job:

```java
@Override
public void close() throws IOException {
    List<Closeable> closeables = new ArrayList<>();
    for (Processor.Factory factory : processorFactories.values()) {
        if (factory instanceof Closeable) {
            closeables.add((Closeable) factory);
        }
    }
    IOUtils.close(closeables);
}
```

But apparently this method is never called in `Node#stop()`.

Closes #17625.
2016-04-08 18:19:57 +02:00
Adrien Grand 42526ac28e Remove Settings.settingsBuilder.
We have both `Settings.settingsBuilder` and `Settings.builder` that do exactly
the same thing, so we should keep only one. I kept `Settings.builder` since it
has my preference but also it is the one that we use in examples of the Java API.
2016-04-08 18:10:02 +02:00
Nik Everett df8a971966 Assert names of read writeables
Adds an assertion that when reading a NamedWriteable it has the same name
you read. It'd be *super* weird if it didn't.
2016-04-08 08:30:22 -04:00
Nik Everett d349de71aa Remove registerQueryParser
We've fully cut over to registerQuery!
2016-04-08 08:17:25 -04:00
Jim Ferenczi c565718ae6 Simplify AllEntries, AllField and AllFieldMapper:
* Create one AllField field per field eligible for _all.
  * Add a positionIncrementGap (with a size of 100, not configurable) between
  each entry in order to distinguish fields when doing phrase query on _all.
2016-04-08 10:58:58 +02:00
Adrien Grand 0d8e399781 Fix `MapperService.unmappedType("string")` to not raise an error.
A deprecation log will be emitted if you do. This should fix the kibana build.
2016-04-08 10:08:36 +02:00
Nik Everett e0cde29a68 Cut over remaining queries to registerQuery 2016-04-07 18:48:10 -04:00
Chris Earle d97d5ebb8b Remove hostname from NetworkAddress.format
This removes the inconsistent output of IP addresses. The format was parsing-unfriendly and it makes it hard
to reason about API responses, such as to _nodes.

With this change in place, it will never print the hostname as part of the default format, which has the
added benefit that it can be used consistently for URIs, which was not the case when the hostname might
appear at the front with "hostname/ip:port".
2016-04-07 17:27:59 -04:00
Ali Beyad 763a659830 Fixes reading of CORS pre-flight headers and methods
CORS headers and methods config parameters must be read as arrays.  This
commit fixes the issue.  It affects http.cors.allow-methods and
http.cors.allow-headers.

Fixes #17483
2016-04-07 15:32:47 -04:00
Lee Hinman 82c2b1e48e Merge remote-tracking branch 'dakrone/allocation-explain-show-delay' 2016-04-07 12:56:28 -06:00
Lee Hinman 199c7256c8 Make passed in settings final and use Settings instead of strings 2016-04-07 12:55:25 -06:00
Lee Hinman 38d6ae1e20 Merge commit '8e01b093d0307a67a09bcb238452078becb62707' into dakrone/disk-info-ignore-shadow-size 2016-04-07 11:35:51 -06:00
Igor Motov 81c59cae18 Add _cat/tasks
Adds new _cat endpoint that lists all tasks
2016-04-07 09:28:21 -06:00
Jason Tedor 6a0e2d1f2d Remove leftover forbidden suppression in ZD 2016-04-07 11:22:29 -04:00
Adrien Grand c33300c543 Make MappedFieldType responsible for providing a parser/formatter. #17546
Aggregations need to perform instanceof calls on MappedFieldType instances in
order to know how they should be parsed or formatted. Instead, we should let
the field types provide a formatter/parser that can can be used.
2016-04-07 16:57:50 +02:00
jaymode f9d1e8a5f3 Root rest api delegates to a transport action
This change makes the root (/) rest api delegate to a transport action to get the
data for the response. This aligns this rest api with all of the other apis, which
delegate to one or more actions.

In doing this, unit tests were added to provide coverage of the RestMainAction
and the associated classes.
2016-04-07 10:03:49 -04:00
Adrien Grand e1bfe23c22 ExtendedStatsAggregator should also pass sigma to emtpy aggs. #17388
Because sigma is also used at reduce time, it should be passed to empty aggs.
Otherwise it causes bugs when an empty aggregation is used to perform reduction
is it would assume a sigma of zero.

Closes #17362
2016-04-07 09:34:11 +02:00
Jason Tedor 0a69985153 Merge pull request #17038 from jasontedor/enable_acked
Prepare for enabling acked indexing
2016-04-06 18:13:28 -04:00
Nik Everett 4841c5a3d3 Cut CustomQueryParserIT to registerQuery
This is the last place inside of ES other than SearchModule.
2016-04-06 16:38:56 -04:00
Jimmy Jones f157dae053 Disallow unquoted field names, fix testcases using unquoted JSON 2016-04-06 14:37:15 -06:00
Martijn van Groningen 63261f14d4 test: better fix for: 78d2311c5f 2016-04-06 22:23:00 +02:00
Martijn van Groningen ec4ebf31b0 Revert "test: don't do fuzzy on bool field"
This reverts commit 78d2311c5f.
2016-04-06 22:18:57 +02:00
Martijn van Groningen 5ff68d173d Removed unneeded refresh during post recovery.
and removed an obsolete exception, `_percolator` type is now `.percolator` since version 1.0
2016-04-06 22:06:14 +02:00
Adrien Grand 57059f1410 Fail if an object is added after a field with the same name. #17568
Today we fail if you try to add a field and an object from another type already
has the same name. However, we do NOT fail if you insert the field first and the
object afterwards. This leads to bad bugs since mappings are not necessarily
parsed in the same order at recovery time, so a mapping update could succeed and
then you would fail to reopen the index.
2016-04-06 20:16:11 +02:00
Jason Tedor 95feb40bef Remove superfluous validation of incoming states
This commit removes a superfluous check when validing incoming cluster
states. The check in question prevents out-of-order cluster states from
the same master from entering the queue. However, such out-of-order
cluster states will be cleaned from the queue when a commit message for
that cluster state arrives or a commit message for any higher-versioned
cluster state arrives.
2016-04-06 13:53:21 -04:00
Michael McCandless 8a9b5ccbc4 Merge pull request #17569 from mikemccand/imc_version_conflict_recovery
NullPointerException from IndexingMemoryController when a version conflict happens during recovery
2016-04-06 13:47:00 -04:00
Mike McCandless dea3678ef9 handle null Engine.Operation.getTranslogLocation in IndexingMemoryController 2016-04-06 13:34:01 -04:00
Nik Everett 16c12afabe Rework ScoreFunctionBuilder registration to remove PROTOTYPEs
This removes PROTOTYPEs from ScoreFunctionsBuilders. To do so we rework
registration so it doesn't need PROTOTYPEs and lines up with the recent
changes to query registration.
2016-04-06 13:04:11 -04:00
Nik Everett 1afc9b7e56 Cut multi_match query to registerQuery 2016-04-06 12:30:05 -04:00
Nik Everett f61c29e67b Move more queries to registerQuery 2016-04-06 11:51:06 -04:00
Nik Everett 03ce5e19eb 4 more queries 2016-04-06 11:15:23 -04:00
Nik Everett 2b6866d26b Fix references to the removed parsers
Mostly stuff is just in the builder now.
2016-04-06 11:15:22 -04:00
Nik Everett c68a58b67e Move the bottom third of queries to registerQuery
Mostly this is just moving fromXContent, making it public, and moving
the ParseFields used in parsing and making them private.
2016-04-06 11:15:22 -04:00
Colin Goodheart-Smithe c5ce78ed44 Aggregations: Fixes NPE when no window is specified in moving average request
This PR fixes a bug where a NPE was thrown when parsing a moving average pipeline aggregation request which did not specify a window size.

Closes #17516
2016-04-06 15:56:26 +01:00
Martijn van Groningen 78d2311c5f test: don't do fuzzy on bool field 2016-04-06 16:49:26 +02:00