Commit Graph

21368 Commits

Author SHA1 Message Date
Nik Everett 2ed7769ddc Make registerScoreFunction look like registerQuery
The order of the first two arguments was different on the two register
functions. This makes them consistent.
2016-04-12 11:35:29 -04:00
Jason Tedor 3879aa2a98 Add JVM options configuration file
This commit adds a new configuration file jvm.options to centralize and
simplify management of JVM options. This separates the configuration of
the JVM from the packaging scripts (bin/elasticsearch*, bin/service.bat,
and init.d/elasticsearch) simplifying end-user operational management of
custom JVM options.
2016-04-12 11:19:16 -04:00
Nik Everett eb338f46f7 Remove PROTOTYPE from QueryBuilders
Relates to #17085
2016-04-12 08:18:07 -04:00
Martijn van Groningen 6776586725 percolator: small cleanup by using MemoryIndex#fromDocument(...) helper
Now also `position_increment_gap` is taken into account.

Closes #9386
2016-04-12 10:50:42 +02:00
Adrien Grand 226644ea2c Do not assume term queries use the inverted index. #17532
We have a couple places in the code base that assume that search is always done
on the inverted index. However with the new points API in Lucene 6, this is not
true anymore. This commit makes MappedFieldType.indexedValueForSearch protected
and fixes call sites to keep working for field types that use the inverted
index and either work differently ar throw an exception otherwise. For instance,
it will still be possible to run cross_fields multi match queries on numeric
fields, but the score contributions will not be blended as well as before, and
significant terms aggregations on long terms will not be possible anymore since
points do not record document frequencies.
2016-04-12 09:47:20 +02:00
Adrien Grand 013acf9179 Remove MappedFieldType.value. #17557
This commit removes `MappedFieldType.value` and simplifies
`MappedFieldType.valueforSearch`. `valueforSearch` was used to post-process
values that come for stored fields (eg. to convert a long back to a string
representation of a date in the case of a date field) and also values that
are extracted from the source but only in the case of GET calls: it would
not be called when performing source filtering on search requests.

`valueforSearch` is now only called for stored fields, since values that are
extracted from the source should already be formatted as expected.
2016-04-12 09:12:56 +02:00
Adrien Grand 7ad804fa52 Remove MappedFieldType.isSortable(). #17598
It is not really needed.
2016-04-12 08:57:02 +02:00
Adrien Grand a14db8e17e Remove MappedFieldType.useTermQueryWithQueryString() and isNumeric(). #17599
In both cases, what elasticsearch is really interested in is whether the field
is an analyzed string field. So it can just check `tokenized()` instead.
2016-04-12 08:45:28 +02:00
Nicholas Knize 3460fdb3a4 removing remaining lucene.experimental javadoc tag 2016-04-11 21:39:59 -05:00
Nicholas Knize 7112827dd2 remove unknown javadoc tag 2016-04-11 20:52:12 -05:00
Nick Knize 09528f5c39 Merge pull request #17657 from jpountz/upgrade/lucene-6.0.0
Upgrade to lucene 6 release
2016-04-11 17:37:00 -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
Nik Everett 56f061b0b4 Replace protected setter with protected member
It is more groovy? It is easier to read at least.
2016-04-11 17:39:12 -04:00
Nik Everett 5968c4d9d1 Fix UP-TO-DATE check for some tasks
* third party audit
* jar hell
* properties file write in buildSrc
* license headers
2016-04-11 17:29:33 -04: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
Lee Hinman dd8afc9567 [TEST] Add extra logging for vagrant test output
The $user, $group, and $privileges are echoed when they are being
compared.
2016-04-11 09:36:50 -06: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
Yannick Welsch b08d453a0a Fix EC2 Discovery settings (#17651)
Fixes two bugs introduced by the settings refactoring in #16602
2016-04-11 16:17:55 +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
Jason Tedor 29278f8482 Output JAVA_HOME during builds
This commit enhances the build logging output to also output JAVA_HOME
(and, if applicable, org.gradle.java.home).

Closes #17629
2016-04-08 14:52:48 -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
Adrien Grand 4391594e4c Use Settings.builder instead of settingsBuilder in ESSmokeClientTestCase. 2016-04-08 18:37:05 +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
Greg Marzouka 37cb00a0b5 Merge pull request #17576 from gmarz/docs/windows-install
[DOCS] Update instructions for running on Windows
2016-04-07 18:01:42 -04:00
gmarz 6d9ed8ebf6 [DOCS] Update instructions for running on Windows
Closes #16455
2016-04-07 17:59:58 -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
Greg Marzouka ee3c15898b Merge pull request #17312 from detouched/dpenkin/configure-elasticsearch-service-user
Allow configuring Windows service name, description and user
2016-04-07 17:22:16 -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
Adrien Grand 1d0239c125 Add a warning about the impact of sorting terms aggregations on the accuracy of doc counts. 2016-04-07 16:57:44 +02:00