Commit Graph

25022 Commits

Author SHA1 Message Date
Simon Willnauer c98e3f60f7 Ensure source filtering automatons are only compiled once (#20857)
This change adds a overloaded `XContentMapValues#filter` method that returns
a function enclosing the compiled automatons that can be reused across filter
calls. This for instance prevents compiling automatons over and over again when
hits are filtered or in the SourceFieldMapper for each document.

Closes #20839
2016-10-11 15:30:38 +02:00
Nik Everett 3528a514e2 Fix docs build
Removes a non-existant file from the non-`// CONSOLE` list. If you
remove all the non-`// CONSOLE` snippets from a file it must be
removed from the whitelist for the build to pass. Removing the file
entirely counts as removing the snippets.

Related to #18160
2016-10-11 08:58:51 -04:00
Clinton Gormley 82e2f6e747 Document the ctx._now variable in the update API
Relates to #20835
2016-10-11 13:13:03 +02:00
Clinton Gormley 5b5306ea82 Add an indices-upgrade section to the docs redirects. 2016-10-11 12:39:02 +02:00
Clinton Gormley a7d8de14bb Removed the upgrade API docs
Relates to #20675
2016-10-11 12:21:46 +02:00
Clinton Gormley 02a739d3c9 Added upgrade docs explaining how to reindex in place or reindex from remote
Closes #20675
2016-10-11 12:14:35 +02:00
Tanguy Leroux e4c7d8183e XContentBuilder: Avoid building self-referencing objects (#20550)
Some objects like maps, iterables or arrays of objects can self-reference themselves. This is mostly due to a bug in code but the XContentBuilder should be able to detect such situations and throws an IllegalArgumentException instead of building objects over and over until a stackoverflow occurs.

closes #20540
closes #19475
2016-10-11 11:41:54 +02:00
Boaz Leskes 1753c49beb add promised comment to testCanResetUnreasonableSettings
it got lost in a broken git song and dance.
2016-10-11 10:44:16 +02:00
Boaz Leskes fc4645bae6 Cluster Settings Updates should not trigger circuit breakers. (#20827)
Settings updates are important to be able to help and administer a cluster in distress. We shouldn't block it due to circuit breakers. An extreme example is where we are actually trying to increase and unreasonable low setting for the circuit breaker itself.

See https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+g1gc/242/
2016-10-11 10:36:55 +02:00
Boaz Leskes 1fe92360bc log debug in testShadowReplicaNaturalRelocation 2016-10-11 10:35:47 +02:00
Adrien Grand 1914df7b5f Do not cache script queries. (#20799)
The cache relies on the equals() method so we just need to make sure script
queries can never be equals, even to themselves in the case that a weight
is used to produce a Scorer on the same segment multiple times.

Closes #20763
2016-10-11 09:17:21 +02:00
Clinton Gormley 971b7ec542 Added version 5.0.0-rc2 2016-10-11 08:59:45 +02:00
Lee Hinman bd8f546381 Enable incremental compilation in gradle (#20847) 2016-10-10 15:47:35 -06:00
Pascal Borreli fcb01deb34 Fixed typos (#20843) 2016-10-10 14:51:47 -06:00
Simon Willnauer 44d960ea85 Handle rejected pings on shutdown gracefully (#20842)
`TcpTransport.ScheduledPing` doesn't handle rejected exceutions gracefully
if the executor is shutting down. This change adds correct exception handling
if we try to schedule another ping while the node is shutting down.
2016-10-10 22:22:48 +02:00
Simon Willnauer 37ca38df3d Expose `ctx._now` in update scripts (#20835)
Update scripts might want to update the documents `_timestamp` but need a notion of `now()`.
Painless doesn't support any notion of now() since it would make scripts non-pure functions. Yet,
in the update case this is a valid value and we can pass it with the context together to allow the
script to record the timestamp the document was updated.

Relates to #17895
2016-10-10 21:14:14 +02:00
Jim Ferenczi e874dee3bc Handle SynonymQuery extraction for the FastVectorHighlighter (#20829)
SynonymQuery was ignored by the FastVectorHighlighter.
This change adds the support for SynonymQuery in the FVH.
Although this change should be implemented in Lucene directly which is why https://issues.apache.org/jira/browse/LUCENE-7484 has been opened.
In the meantime this PR handles the issue on ES side and could be removed when LUCENE-7484 gets merged.

Fixes #20781
2016-10-10 17:46:19 +02:00
Jim Ferenczi c80a563a71 Replace org.elasticsearch.common.lucene.search.MatchNoDocsQuery with its Lucene version (org.apache.lucene.search.MatchNoDocsQuery) (#20832)
* Replace org.elasticsearch.common.lucene.search.MatchNoDocsQuery with its Lucene version (org.apache.lucene.search.MatchNoDocsQuery)

This change removes the ES version of the match no docs query and replaces it with the Lucene version.

relates #18030

* Add missing change
2016-10-10 17:45:19 +02:00
Simon Willnauer 4fd1276542 Prevent AbstractArrays from release bytes more than once (#20819)
Today we throw an assertion error if we release an AbstractArray more than once.
Yet, it's recommended to implement close methods such that they can be invoked
more than once. Guaranteed single release calls are hard to implement and some
situations might not be tested causing for instance `CircuitBreaker` to operate on
corrupted memory stats.
2016-10-10 17:30:37 +02:00
Daniel Mitterdorfer 087a931cb2 Use 'pipe' instead of of 'comma' to separate benchmark params
With this commit we separate benchmark parameters with pipe symbols
instead of commas as JMH has a special formatting logic for comma-separated
string which messes up the JSON output of microbenchmarks.
2016-10-10 14:56:44 +02:00
Alexander Reelsen 2e447479c0 Tests: Fix ingest-attachment vagrant tests
The vagrant tests are checking for a certain jar version.

Relates #20710
2016-10-10 14:54:35 +02:00
Nik Everett c414faf2fb Reword note about windows and FDs
Make it clear why this isn't a thing in windows and remove value
judgement about file descriptors.

Relates to #20737
2016-10-10 08:47:25 -04:00
Alexander Reelsen 3c2e51d831 Deps: Update ingest-attachment to latest libraries (#20710)
Also added a test to check for a with a regular PDF,
instead of only an encrypted one with expected exception.
2016-10-10 12:55:05 +02:00
javanna e154e6a758 [TEST] reformatted comment in query tests 2016-10-10 10:53:17 +02:00
Jim Ferenczi 767a7e2329 Fix match_phrase_prefix query with single term on _all field (#20471)
* Fix match_phrase_prefix query with single term on _all field

This change fixes the match_phrase_prefix query when a single term is queried on the _all field.
It builds a prefix query instead of an AllTermQuery which would not match any prefix.

Fixes #20470

* Add missing change
2016-10-10 09:47:26 +02:00
Adrien Grand 8ab7ca5284 Source filtering should treat dots in field names as sub objects. (#20736)
Mappings treat dots in field names as sub objects, for instance

```
{
  "a.b": "c"
}
```

generates the same dynamic mappings as

```
{
  "a": {
    "b": "c"
  }
}
```

Source filtering should be consistent with this behaviour so that an include
list containing `a` should include fields whose name is `a.b`.

To make this change easier, source filtering was refactored to use automata.
The ability to treat dots in field names as sub objects is provided by the
`makeMatchDotsInFieldNames` method of `XContentMapValues`.

Closes #20719
2016-10-10 09:32:26 +02:00
Nik Everett 741ecf80ff Loosen assertion in getting-started.asciidoc
We were asserting that the size of an index had a decimal point but it
doesn't always:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.0+java9-periodic/240/console
2016-10-09 13:47:59 -04:00
Nik Everett 6418f89feb Remove NodeServicesProvider
Instead provide services where they are needed. The class worked
well as a temporary measure to easy removal of guice from the index
level but now we can remove it entirely.

-1 @Inject annotation
2016-10-08 07:35:58 -04:00
Lucas Bremgartner 4bf45e53a5 Documentation: comments in index templates (#20701)
Fixes #20513
2016-10-08 12:38:45 +02:00
Clinton Gormley 22f1acde94 Docs: Pattern analyzer does not support a max_token_length parameter
Closes #20713
2016-10-08 12:27:33 +02:00
Areek Zillur fe50db2e8d fix bug in update operation in shard bulk execution 2016-10-07 18:28:51 -04:00
Areek Zillur 9d48248a66 remove redundant final qualifier 2016-10-07 17:56:35 -04:00
Areek Zillur c747085b70 Merge branch 'master' into cleanup/transport_bulk 2016-10-07 17:52:53 -04:00
Areek Zillur 97a6756521 Revert "Make update a replication action"
This reverts commit eee0d18f94.
2016-10-07 17:50:15 -04:00
Areek Zillur 396f80c963 Revert "rename DocumentRequest to DocumentWriteRequest"
This reverts commit b5079ce009.
2016-10-07 17:50:07 -04:00
Areek Zillur 68c82cd113 Revert "fix bug in bulk replication for noop update operation"
This reverts commit 42bc2d15be.
2016-10-07 17:49:57 -04:00
Areek Zillur 5bbdcd6416 Revert "remove duplicate logic for request resolution and routing verification"
This reverts commit 2a651fc296.
2016-10-07 17:48:44 -04:00
David Pilato 2e1539b879 Fix URL for plugins
Reported at https://discuss.elastic.co/t/ingest-geoip-for-beta1/62505
2016-10-07 23:33:13 +02:00
Nik Everett 06049283a0 CONSOLEify some _cat docs
`/_cat/count`, `/_cat/fielddata`, and `/_cat/health`.

Three more files down, 141 to go.

Relates to #18160
2016-10-07 16:30:45 -04:00
Tom Manterfield 1bf11dc09a Updated documentation to include precise version of gradle currently required for building (#20776) 2016-10-07 20:24:37 +02:00
Jason Tedor 535bf92280 Upgrade Log4j 2 to version 2.7
This commit upgrades the Log4j 2 dependency to version 2.7 and removes
some hacks that we had in place to work around bugs in Log4j 2 version
2.6.2.

Relates #20805
2016-10-07 13:05:30 -05:00
Clinton Gormley 2fa1d0d5f9 Added version 2.4.1 with bwc indices 2016-10-07 19:06:52 +02:00
Shane Connelly 78ae19ae5e Merge pull request #20784 from eskibars/master
Add a note that reindex does not set up mappings, etc
2016-10-07 09:39:10 -07:00
Nik Everett cf4038b668 DeGuice some of IndicesModule
UpdateHelper, MetaDataIndexUpgradeService, and some recovery
stuff.

Move ClusterSettings to nullable ctor parameter of TransportService
so it isn't forgotten.
2016-10-07 11:14:38 -04:00
Clinton Gormley 6cf7a93837 Better formatting of date-match URL encoding 2016-10-07 16:33:30 +02:00
Simon Willnauer 7452028e50 Simplify TransportAddress (#20798)
since TransportAddress is now final we can simplify it's interface a bit
and remove methods that are only used in tests or are plain delegates.
2016-10-07 15:56:54 +02:00
Clinton Gormley eb62f90578 Document date math use in the rollover API (#20780)
* Document date math use in the rollover API

Relates to #20709
2016-10-07 15:49:28 +02:00
Colin Goodheart-Smithe 4981f2fd51 Makes freezing QueryShardContext safer by stopping overrides (#20800)
The `QueryShardContext.failIfFrozen()` and `QueryShardContext.freezeContext()`
methods should be final so that overriding/bypassing the freezing of
`QueryShardContext` is not possible. This is important so that we can
trust when the `QueryShardContext` says a request is cacheable.

This change also makes the methods that call `QueryShardContext.failIfFrozen()`
`final` so they cannot be overridden to bypass setting the request as not
cacheable.
2016-10-07 14:37:29 +01:00
Adrien Grand 7a403f640b Clarify some docs about geo-distance sorting. (#20735)
This also improves formatting a bit.
2016-10-07 15:26:34 +02:00
Adrien Grand c1e5421b77 Make range queries round up upper bounds again. (#20582)
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they
were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run
`[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like
`2016-09-20T15:32:44`. This behaviour was lost in the cleanups of #8889.

Closes #20579
2016-10-07 14:22:15 +02:00