summaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2017-07-04[Analysis] Support normalizer in request param (#24767)Jun Ohtani
* [Analysis] Support normalizer in request param Support normalizer param Support custom normalizer with char_filter/filter param Closes #23347
2017-07-04Adds check for negative search request size (#25397)Colin Goodheart-Smithe
* Adds check for negative search request size This change adds a check to `SearchSourceBuilder` to throw and exception if the size set on it is set to a negative value. Closes #22530 * fix error in reindex * update re-index tests * Addresses review comment * Fixed tests * Added random negative size test * Fixes test
2017-07-03Remove QueryParseContext (#25486)Christoph Büscher
QueryParseContext is currently only used as a wrapper for an XContentParser, so this change removes it entirely and changes the appropriate APIs that use it so far to only accept a parser instead.
2017-07-02Cleanup network / transport related settings (#25489)Simon Willnauer
This commit makes the use of the global network settings explicit instead of implicit within NetworkService. It cleans up several places where we fall back to the global settings while we should have used tcp or http ones. In addition this change also removes unnecessary settings classes
2017-06-29Remove unregistered `transport.netty.*` settings (#25476)Simon Willnauer
These settings have not be working for a full major version since they are not registered. Given that they are simply duplicates we can just remove them.
2017-06-29Remove QueryParseContext from parsing QueryBuilders (#25448)Christoph Büscher
Currently QueryParseContext is only a thin wrapper around an XContentParser that adds little functionality of its own. I provides helpers for long deprecated field names which can be removed and two helper methods that can be made static and moved to other classes. This is a first step in helping to remove QueryParseContext entirely.
2017-06-29Unify the result interfaces from get and search in Java client (#25361)olcbean
As GetField and SearchHitField have the same members, they have been unified into DocumentField. Closes #16440
2017-06-27test: Make many percolator integration tests real integration testsMartijn van Groningen
2017-06-26Remove `mapping.single_type` from parent join test (#25391)Simon Willnauer
This removes the remaining usage of `mapping.single_type` from the parent join module and moves it's bwc test to the mixed cluster tests Relates to #24961 Relates to #20257
2017-06-26Move more token filters to analysis-common moduleMartijn van Groningen
The following token filters were moved: stemmer, stemmer_override, kstem, dictionary_decompounder, hyphenation_decompounder, reverse, elision and truncate. Relates to #23658
2017-06-23Remove `index.mapping.single_type=false` from reindex tests (#25365)Nik Everett
* Remove the setting from the yml tests and replace with tests using `join` field. We can't use the setting in yml tests without lots of backflips but we have `ReindexParentChildTests` for the coverage. There weren't tests for `join` field with reindex before this. Adding these tests discovered #25363. * Remove the setting from `ReindexParentChildTests` and replace with `index.version.created=V_5_6_0`. This test can be entirely removed when legacy parent/child support is dropped from core. * Port the yml tests that set _parent into integ tests so they can set the index created version. These tests can be removed when we drop support for _parent in core. * Port a delete-by-query test for filtering based on type to an `ESIntegTestCase` so it can use `index.version.created=5.6.0` to setup documents of multiple types. This whole feature can be dropped when we no longer support multiple types per index. Relates to #24961
2017-06-23Remove remaining `index.mapping.single_type=false` (#25369)Simon Willnauer
This change cleans up remaining tests to not use index.mapping.single_type=false but instead where applicable use a single type or markt the index as created with a pre 6.x version. Yet, there is still on leftover in the client tests that needs special attention. See `org.elasticsearch.client.SearchIT` Relates to #24961
2017-06-22fix sort and string processor tests around targetField (#25358)Tal Levy
Tests were randomly assigning `targetField` to an existing field that was an array, causing path resolution issues. This PR fixes those tests Closes #25346 & #25348
2017-06-22Update Painless to Allow Augmentation from Any Class (#25360)Jack Conradson
Custom whitelists in Painless will need to allow classes to be augmented beyond the currently hard-coded Augmentation class tied to Painless directly. This change allows any class to specify an augmentation on a Painless struct using an appropriate static method. Changes to loading the whitelist have also been created to allow for this specification of a different class for augmentation.
2017-06-22test: single type defaults to true since alpha1 and not alpha3Martijn van Groningen
Closes #25354
2017-06-22Upgrade to lucene-7.0.0-snapshot-ad2cb77. (#25349)Adrien Grand
Most notable changes: - better update concurrency: LUCENE-7868 - TopDocs.totalHits is now a long: LUCENE-7872 - QueryBuilder does not remove the boolean query around multi-term synonyms: LUCENE-7878 - removal of Fields: LUCENE-7500 For the `TopDocs.totalHits` change, this PR relies on the fact that the encoding of vInts and vLongs are compatible: you can write and read with any of them as long as the value can be represented by a positive int.
2017-06-22percolator: Deprecate `document_type` parameter.Martijn van Groningen
The `document_type` parameter is no longer required to be specified, because by default from 6.0 only a single type is allowed. (`index.mapping.single_type` defaults to `true`)
2017-06-20Fix reindex test when log level is debugNik Everett
When log level is debug we'd dereference null because the test was being cute and cutting corners. Relates to #25256
2017-06-20Parse synonyms with the same analysis chain (#8049)Jun Ohtani
* [Analysis] Parse synonyms with the same analysis chain Synonym Token Filter / Synonym Graph Filter tokenize synonyms with whatever tokenizer and token filters appear before it in the chain. Close #7199
2017-06-19Tweak reindex cancel logic and add many debug logs (#25256)Nik Everett
I'm still trying to hunt down rare failures in the cancelation tests for reindex and friends. Here is the latest: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-unix-compatibility/os=ubuntu/876/console It doesn't show much, other than that one of the tasks didn't kill itself when asked to cancel. So I'm going a bit crazy with debug logging so that the next time this comes up I can trace exactly what happened. Additionally, this tweaks the logic around how rethrottles were performed around cancel. Previously we set the `requestsPerSecond` to `0` when we cancelled the task. That was the "old way" to set them to inifity which was the intent. This switches that from `0` to `Float.MAX_VALUE` which is the "new way" to set the `requestsPerSecond` to infinity. I don't know that this is much better, but it feels better.
2017-06-19Rename simple pattern tokenizers (#25300)Andy Bristol
Changed names to be snake case for consistency Related to #25159, original issue #23363
2017-06-17Replace deprecated API usage in Netty4HttpChannelSimon Willnauer
2017-06-17[Tests] Check that parsing aggregations works in a forward compatible way ↵Christoph Büscher
(#25219) This change adds tests for the aggregation parsing that try to simulate that we can parse existing aggregations in a forward compatible way in the future, ignoring potential newly added fields or substructures to the xContent response.
2017-06-16Move TransportStats accounting into TcpTransport (#25251)Simon Willnauer
Today TcpTransport is the de-facto base-class for transport implementations. The need for all the callbacks we have in TransportServiceAdaptor are not necessary anymore since we can simply have the logic inside the base class itself. This change moves the stats metrics directly into TcpTransport removing the need for low level bytes send / received callbacks.
2017-06-16Move pre-configured "keyword" tokenizer to the analysis-common module (#24863)Nik Everett
Moves the keyword tokenizer to the analysis-common module. The keyword tokenizer is special because it is used by CustomNormalizerProvider so I pulled it out into its own PR. To get the move to work I've reworked the lookup from static to one using the AnalysisRegistry. This seems safe enough. Part of #23658.
2017-06-15Add needs methods for specific variables to Painless script context ↵Jack Conradson
factories. (#25267)
2017-06-15Moved more token filters to analysis-common module.Martijn van Groningen
The following token filters were moved: `edge_ngram`, `ngram`, `uppercase`, `lowercase`, `length`, `flatten_graph` and `unique`. Relates to #23658
2017-06-15[Test] restore BWC for parent-join now that the new mapping format is in 5.xJim Ferenczi
2017-06-15Add a section named "relations" in the ParentJoinFieldMapper (#25248)Jim Ferenczi
* Add a section named "relation" in the ParentJoinFieldMapper This commit puts the parent/child definition in an inner section named "relation". Mapping for the parent-join will look like this: ``` "join_field": { "type": "join" "relations": "parent": "child" } } ```
2017-06-15fix: Sort Processor does not have proper behavior with targetField (#25237)Tal Levy
to specify a `targetField`. This results in some interesting behavior that was missed in the review. This processor sorts in-place, so there is a side-effect in both the original field and the target field. Another bug was that the targetField was not being set if the list being sorted was fewer than two elements. The new behavior works like this: If targetField and fieldName are not the same, we copy the list.
2017-06-15move assertBusy to use CheckException (#25246)Boaz Leskes
We use assertBusy in many places where the underlying code throw exceptions. Currently we need to wrap those exceptions in a RuntimeException which is ugly.
2017-06-15Use SPI in High Level Rest Client to load XContent parsers (#25098)Tanguy Leroux
This commit adds a NamedXContentProvider interface that can be implemented by plugins or modules using Java's SPI feature in order to provide additional NamedXContent parsers to external applications like the Java High Level Rest Client.
2017-06-15Upgrade to lucene-7.0.0-snapshot-92b1783. (#25222)Adrien Grand
This snapshot has faster range queries on range fields (LUCENE-7828), more accurate norms (LUCENE-7730) and the ability to use fake term frequencies (LUCENE-7854).
2017-06-14Scripting: Rename SearchScript.needsScores to needs_score (#25235)Ryan Ernst
This commit renames the needsScores method so as to make it automatically generatable, based on the name of the `_score` variable which is available in search scripts. It also adds documentation to ScriptContext to explain the naming and signature of such methods.
2017-06-14Support script context stateful factory in Painless. (#25233)Jack Conradson
2017-06-13expose simple pattern tokenizers (#25159)Andy Bristol
Expose the experimental simplepattern and simplepatternsplit tokenizers in the common analysis plugin. They provide tokenization based on regular expressions, using Lucene's deterministic regex implementation that is usually faster than Java's and has protections against creating too-deep stacks during matching. Both have a not-very-useful default pattern of the empty string because all tokenizer factories must be able to be instantiated at index creation time. They should always be configured by the user in practice.
2017-06-13Add target_field parameter to gsub, join, lowercase, sort, split, trim, ↵Alexander Kazakov
uppercase (#24133) Closes #23682 #23228
2017-06-13Ensure pending transport handlers are invoked for all channel failures (#25150)Simon Willnauer
Today if a channel gets closed due to a disconnect we notify the response handler that the connection is closed and the node is disconnected. Unfortunately this is not a complete solution since it only works for published connections. Connections that are unpublished ie. for discovery can indefinitely hang since we never invoke their handers when we get a failure while a user is waiting for the response. This change adds connection tracking to TcpTransport that ensures we are notifying the corresponding connection if there is a failure on a channel.
2017-06-11Fix get mappings HEAD requestsJason Tedor
Get mappings HEAD requests incorrectly return a content-length header of 0. This commit addresses this by removing the special handling for get mappings HEAD requests, and just relying on the general mechanism that exists for handling HEAD requests in the REST layer. Relates #23192
2017-06-10Fix handling of exceptions thrown on HEAD requestsJason Tedor
Today when an exception is thrown handling a HEAD request, the body is swallowed before the channel has a chance to see it. Yet, the channel is where we compute the content length that would be returned as a header in the response. This is a violation of the HTTP specification. This commit addresses the issue. To address this issue, we remove the special handling in bytes rest response for HEAD requests when an exception is thrown. Instead, we let the upstream channel handle the special case, as we already do today for the non-exceptional case. Relates #25172
2017-06-09Scripting: Change keys for inline/stored scripts to source/id (#25127)Ryan Ernst
This commit adds back "id" as the key within a script to specify a stored script (which with file scripts now gone is no longer ambiguous). It also adds "source" as a replacement for "code". This is in an attempt to normalize how scripts are specified across both put stored scripts and script usages, including search template requests. This also deprecates the old inline/stored keys.
2017-06-09Remove the postings highlighter and make unified the default highlighter ↵Jim Ferenczi
choice (#25028) This change removes the `postings` highlighter. This highlighter has been removed from Lucene master (7.x) because it behaves exactly like the `unified` highlighter when index_options is set to `offsets`: https://issues.apache.org/jira/browse/LUCENE-7815 It also makes the `unified` highlighter the default choice for highlighting a field (if `type` is not provided). The strategy used internally by this highlighter remain the same as before, it checks `term_vectors` first, then `postings` and ultimately it re-analyzes the text. Ultimately it rewrites the docs so that the options that the `unified` highlighter cannot handle are clearly marked as such. There are few features that the `unified` highlighter is not able to handle which is why the other highlighters (`plain` and `fvh`) are still available. I'll open separate issues for these features and we'll deprecate the `fvh` and `plain` highlighters when full support for these features have been added to the `unified`.
2017-06-08Add Ingest-Processor specific Rest Endpoints & Add Grok endpoint (#25059)Tal Levy
This PR enables Ingest plugins to leverage processor-scoped REST endpoints. First of which being the Grok endpoint that retrieves Grok Patterns for users to retrieve all the built-in patterns. Example usage: Kibana Grok Autocomplete!
2017-06-08remove Ingest's Internal Template Service (#25085)Tal Levy
Ingest was using it's own wrapper around TemplateScripts and the ScriptService. This commit removes that abstraction
2017-06-08Allow removing multiple fields in ingest processor (#24750)Guillaume Le Floch
* Allow removing multiple fields in ingest processor * Iteration 2 * Few fixes
2017-06-08Always use DisjunctionMaxQuery to build cross fields disjunction (#25115)Jim Ferenczi
This commit modifies query_string, simple_query_string and multi_match queries to always use a DisjunctionMaxQuery when a disjunction over multiple fields is built. The tiebreaker is set to 1 in order to behave like the boolean query in terms of scoring. The removal of the coord factor in Lucene 7 made this change mandatory to correctly handle minimum_should_match. Closes #23966
2017-06-08Leverage scorerSupplier when applicable. (#25109)Adrien Grand
The `scorerSupplier` API allows to give a hint to queries in order to let them know that they will be consumed in a random-access fashion. We should use this for aggregations, function_score and matched queries.
2017-06-07Generate Painless Factory for Creating Script Instances (#25120)Jack Conradson
2017-06-07Add BWC rest test for parent-join after the backport to 5.xJim Ferenczi
2017-06-07Changed inner_hits to work with the new join field type andMartijn van Groningen
at the same time maintaining support for the `_parent` meta field type/ Relates to #20257