Commit Graph

4743 Commits

Author SHA1 Message Date
Igor Motov b01f3b2cd1 Node names cleanup
Fixes two node names contained trailing spaces that was causing cat.tasks test to fail.

Fixes #17718
2016-04-13 12:50:12 -04:00
Sebastian Utz 0b889f1a8f Fix index selection for snapshot restore when non-existent indices are specified (#17715) 2016-04-13 17:25:59 +02:00
Jason Tedor 96456fbd91 Remove remaining uses of JAVA_OPTS
This commit removes the last remaining uses of JAVA_OPTS. Now searching
the codebase for the regex '(?<!ES_)JAVA_OPTS' only shows the uses
warning of its removal and the note about it in the migration docs.
2016-04-13 10:51:53 -04:00
Jim Ferenczi 3c355b66fe Apply the default operator on analyzed wildcard in query_string builder:
* Tokens in the same position are grouped into a SynonymQuery..
 * The default operator is applied on tokens in different positions.
 * The wildcard is applied to the terms in the last position only.
Fixes #2183
2016-04-13 15:41:29 +02:00
Nik Everett edc09a7ac5 Add NORELEASE while we migrate aggregations 2016-04-13 09:31:54 -04:00
Nik Everett e1a3aca08b Remove PROTOTYPE from children aggregation
This required some surgery to get serialization working but should allow
us to do the aggregations one at a time.
2016-04-13 09:31:54 -04:00
Nik Everett a170de5df7 Cut children aggregation to registerAggregation 2016-04-13 09:31:53 -04:00
Nik Everett b8fdb19312 Remove getQueryPrototype from QueryParser
It isn't used any more.
2016-04-13 09:27:19 -04:00
Jason Tedor fc7442739c Output all failing bootstrap checks
This commit modifies the boostrap checks to output all failing checks
instead of early-failing on the first check and then possibly failing
again after the user resolves the first failing check.

Closes #17474
2016-04-13 08:48:20 -04:00
Jason Tedor cfc23a9d67 Move bootstrap checks to node start
This commit moves the execution of the bootstrap checks to after network
services are started. This gives us the flexibility to not merely check
if any of the network settings are set, but instead be smarter about it
and check if the network settings are set in a way that means that the
node will be communicating over an external network (either directly, or
via a proxy). As an bonanza, executing the bootstrap checks in this way
enables us to have the node name in the logs!

Closes #17570
2016-04-13 08:48:10 -04:00
Nik Everett 64f5a4f848 Stop map collisions on FiltersTests
Adds randomUnique to generate unique things and uses it to make unique
keys.

The offending seed was 81AE616FEAD10F17.
2016-04-13 08:35:45 -04:00
Nik Everett cca3154c43 Rename isSourceEmpty to hasSource
And add a test case for {} to reindex.
2016-04-13 08:19:58 -04:00
Jun Ohtani 048d273408 Cat: cat health supports ts=0 option
If ts=0, cat health disable epoch and timestamp
Be Constant String timestamp and epoch
Move timestamp and epoch to Table
Add rest-api test and test

Closes #10109
2016-04-13 18:08:30 +09:00
Daniel Mitterdorfer 0c7795f53d Merge remote-tracking branch 'danielmitterdorfer/bulk-size-limit'
Closes #17133
2016-04-13 10:43:00 +02:00
Adrien Grand 82849a787a Add back the Version.V_5_0_0 constant. #17688 2016-04-13 10:00:37 +02:00
Daniel Mitterdorfer 117bc68af3 Limit request size on HTTP level
With this commit we limit the size of all in-flight requests on
HTTP level. The size is guarded by the same circuit breaker that
is also used on transport level. Similarly, the size that is used
is HTTP content length.

Relates #16011
2016-04-13 09:58:08 +02:00
Daniel Mitterdorfer 52b2016447 Limit request size on transport level
With this commit we limit the size of all in-flight requests on
transport level. The size is guarded by a circuit breaker and is
based on the content size of each request.

By default we use 100% of available heap meaning that the parent
circuit breaker will limit the maximum available size. This value
can be changed by adjusting the setting

network.breaker.inflight_requests.limit

Relates #16011
2016-04-13 09:54:59 +02:00
Nik Everett ba9b72c297 Reformat DirectCandidateGenerator's equals method
We'd like to have checkstyle complain about if statements without braces
for all non-single-line if statements.
2016-04-12 17:30:43 -04:00
Nik Everett fe4d1297df Make AllocationCommands register in the same way as queries
The cluster reroute API had a copy of NamedWriteableRegistry's behavior
inside it in the form of AllocationCommands#registerFactory and
AllocationCommands#lookupFactorySafe. There isn't a reason to duplicate
that effort. So this replaces all of AllocationCommand#Factory with
query-like registration in NetworkModule. Why NetworkModule? Because
the transport client needs it.
2016-04-12 17:29:11 -04:00
Nik Everett d5d85e4350 Isolate StreamableReader
Makes Writeable not depend on StreamableReader. Keeps the default readFrom
implementation for backwards compatibility during the PROTOTYPE removal
but that'll go when those are gone.

Makes Diffable not extend StreamableReader. Instead Diffable has a readFrom
method. The PROTOTYPE removal will not get to cluster state for a long time
so that method will stay.

Now only a few things implement StreamableReader. They will be addressed
individually and then we'll remove StreamableReader.
2016-04-12 15:43:58 -04:00
Nik Everett 7908759949 Make aggregation registration more like query registration
Creates a class to hold behavior common to these `ParseFieldRegistry`s.

Also renames some weirdly named methods on StreamInput.
2016-04-12 14:50:44 -04:00
Christoph Büscher fae0666226 Remove norelease comments in test classes
This doesn't seem to block release, and the comments should
rather be tasks that be left in the code base.
2016-04-12 19:48:46 +02:00
Boaz Leskes 5af6982338 TransportNodesListGatewayStartedShards should fall back to disk based index metadata if not found in cluster state (#17663)
When an index is recovered from disk it's metadata is imported first and the master reaches out to the nodes looking for shards of that index. Sometimes those requests reach other nodes before the cluster state is processed by them. At the moment, that situation disables the checking of the store, which requires the meta data (indices with custom path need to know where the data is). When corruption hits this means we may assign a shard to node with corrupted store, which will be caught later on but causes confusion. Instead we can try loading the meta data from disk in those cases.

Relates to #17630
2016-04-12 18:41:00 +02:00
Christoph Büscher 9567f154e6 Removing unused parse method from SortBuilder 2016-04-12 18:00:55 +02:00
Nik Everett 2c487110b2 Remove PROTOTYPE from SearchSourceBuilder
Relates to #17085
2016-04-12 11:57:57 -04:00
Adrien Grand 3bf6f4076c Do not set analyzers on numeric fields.
When it comes to query parsing, either a field is tokenized and it would go
through analysis with its search_analyzer. Or it is not tokenized and the
raw string should be passed to termQuery(). Since numeric fields are not
tokenized and also declare a search analyzer, values would currently go through
analysis twice...
2016-04-12 17:47:29 +02:00
Colin Goodheart-Smithe f5bade1a0d SimpleQueryParser should call MappedFieldType.termQuery when appropriate. #17678
This will allow to use it on virtual fields like `_index` or `_id` which do not
exist in the index.
2016-04-12 17:47:18 +02:00
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
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
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