Commit Graph

21680 Commits

Author SHA1 Message Date
Christoph Büscher 5a0cfdd6af Change scriptFields member in InnerHitBuilder to set
Adding random shuffling of xContent to InnterHitBuilderTests shows
that the scriptFields are stored in order as a list internally although
they are an unordered json objects in the query dsl.

This changes the internal representation to a set and updates
serialization accordingly.
2016-05-04 17:43:15 +02:00
Nik Everett fad0705e30 [docs] Modernize README.textile
* camel_case all the things
* `?pretty` all the things (we tell people to do this in bug reports)

Closes #18136
2016-05-04 11:01:34 -04:00
Christoph Büscher 223d67df4a Consolidate query generation in QueryShardContext
Currently we have a lot of methods left in QueryShardContext that
take parsers or BytesReference arguments to do some xContent
parsing on the shard. While this still seems necessary in some cases
(e.g. percolation, phrase suggester), the shard context should only
be concerned with generating lucene queries from QueryBuilders.

This change removes all of the parseX() methods in favour of two
public methods toQuery(QueryBuilder) and toFilter(QueryBuilder) that
either call the query builders toFilter() or toQuery() method and
move all code required for parsing out to the respective callers.
2016-05-04 16:52:30 +02:00
Jim Ferenczi 8d3427b44d Fix build: restore illegalScorer still in use in ExpressionSearchScript (2) 2016-05-04 16:48:08 +02:00
Jim Ferenczi c4554fedad Fix build: restore illegalScorer still in use in ExpressionSearchScript 2016-05-04 16:46:44 +02:00
Jim Ferenczi 52eb6f3830 Merge pull request #18127 from jimferenczi/breadth_first_needs_score
Add the ability to use the breadth_first mode with nested aggregations (such as `top_hits`) which require access to score information.
2016-05-04 15:57:08 +02:00
Jason Tedor 78d615f320 Merge pull request #18110 from jasontedor/strings-split-as-array
Remove Strings#splitStringToArray

Remove arbitrary separator/wildcard from PathTrie
2016-05-04 09:38:47 -04:00
Jim Ferenczi 052191f2a2 Add the ability to use the breadth_first mode with nested aggregations (such as `top_hits`) which require access to score information.
The score is recomputed lazily for each document belonging to a top bucket.
Relates to #9825
2016-05-04 15:35:45 +02:00
Jason Tedor 9fe5ce9342 Remove arbitrary separator/wildcard from PathTrie
PathTrie has a constructor that allows for an arbitrary separtor and
wildcard, but this constructor is unused and internally we always use
'/' as the separator and '*' as the wildcard. There are no tests for the
case where the separator differs from the default separator and
wildcard. This commit removes this constructor and now all instances of
PathTrie have the default separator and wildcard.
2016-05-04 09:18:30 -04:00
Jason Tedor 2dea449949 Remove Strings#splitStringToArray
This commit removes the method Strings#splitStringToArray and replaces
the call sites with invocations to String#split. There are only two
explanations for the existence of this method. The first is that
String#split is slightly tricky in that it accepts a regular expression
rather than a character to split on. This means that if s is a string,
s.split(".")  does not split on the character '.', but rather splits on
the regular expression '.' which splits on every character (of course,
this is easily fixed by invoking s.split("\\.") instead). The second
possible explanation is that (again) String#split accepts a regular
expression. This means that there could be a performance concern
compared to just splitting on a single character. However, it turns out
that String#split has a fast path for the case of splitting on a single
character and microbenchmarks show that String#split has 1.5x--2x the
throughput of Strings#splitStringToArray. There is a slight behavior
difference between Strings#splitStringToArray and String#split: namely,
the former would return an empty array in cases when the input string
was null or empty but String#split will just NPE at the call site on
null and return a one-element array containing the empty string when the
input string is empty. There was only one place relying on this behavior
and the call site has been modified accordingly.
2016-05-04 08:12:41 -04:00
Isabel Drost-Fromm 247b5c8430 Merge pull request #18036 from MaineC/enhancement/switch_geodistancesortbuilder_to_geovalidationmethod
Introduces GeoValidationMethod to GeoDistanceSortBuilder
2016-05-04 13:46:07 +02:00
Isabel Drost-Fromm 283a6d27f1 Clean up merge commit changes 2016-05-04 13:34:11 +02:00
Isabel Drost-Fromm 3bc926b7e0 Merge branch 'master' into enhancement/switch_geodistancesortbuilder_to_geovalidationmethod 2016-05-04 13:16:40 +02:00
Isabel Drost-Fromm ffcb132a5e Merge pull request #18042 from MaineC/tests/switch_to_random_value_other_than_for_sort
Get (mostly) rid of random test data generator for sort tests
2016-05-04 13:15:48 +02:00
Isabel Drost-Fromm 6f15f35819 Remove left over references to ESTestCase 2016-05-04 12:14:39 +02:00
Isabel Drost-Fromm 9a90bdce01 Add deprecation warnings for ignore_malformed to reference docs 2016-05-04 12:04:28 +02:00
Isabel Drost-Fromm 6b9ac46402 Merge branch 'master' into enhancement/switch_geodistancesortbuilder_to_geovalidationmethod 2016-05-04 11:30:15 +02:00
Isabel Drost-Fromm ad8bf53bbd Fold helper class into abstract sort test class.
Folds the helper class for random object generation into the
abstract sort test class. Removes a few references to ESTestCase
that were not needed due to inheriting from it along the way.
2016-05-04 11:25:23 +02:00
Isabel Drost-Fromm a8bf75983f Merge branch 'master' into tests/switch_to_random_value_other_than_for_sort 2016-05-04 10:24:46 +02:00
Adrien Grand 51a53c55cb Update store documentation after #17616. 2016-05-04 08:53:11 +02:00
Adrien Grand 80dbe31d59 Add note about using ipv6 addresses in `query_string`. 2016-05-04 08:53:11 +02:00
David Pilato 8bdd319a80 Merge pull request #18125 from jeesim2/patch-3
Update java client.asciidoc - Settings.settingsBuilder() removal.
2016-05-03 22:20:58 -07:00
Jihun No d63362ce43 Update client.asciidoc
as of 42526ac28e
5.0.0 alpha2 have no settingsBuilder() method.
2016-05-04 14:07:28 +09:00
Kelsey DeJesus-Banos 929187c71b Update function-score-query.asciidoc (#18115) 2016-05-03 19:29:57 +02:00
Christoph Büscher ca21aa0cb5 Make reset() in QueryShardContext private
The query shard reset() method resets some internal state in the
query shard context, like clearing query names, the filter flag
or named queries. The problem with this method being public is
that it currently (miss?) used for modifying an existing context
for recursive invocatiob, but the contexts that have been reseted
that way cannot be properly set back to their previous state.

This PR is a step towards removing reset() entirely by first making
it only be used internally in QueryShardContext. In places where
reset() was used we can either create new QueryShardContexts or
modify the existing context because it is discarded afterwards anyway.
2016-05-03 18:56:16 +02:00
Lee Hinman 83973288b0 Merge remote-tracking branch 'dakrone/document-new-explain-stuff' 2016-05-03 10:46:37 -06:00
Chris Earle 21e94e6054 Revert "Removing old documentation mentioning NodeBuilder."
This reverts commit 3ca02d647e.
2016-05-03 12:03:00 -04:00
Lee Hinman 5648253d45 Add documentation for shard store output in allocation explain API
Relates to #17689
2016-05-03 09:51:15 -06:00
Chris Earle 3ca02d647e Removing old documentation mentioning NodeBuilder. 2016-05-03 11:37:34 -04:00
Jason Tedor 85d2fc0e38 Avoid string concatentation in IngestDocument.FieldPath
Today, the constructor for IngestDocument#FieldPath does a string
concatentation and two object allocation on every field path. This
commit removes these unnecessary operations.

Relates #18108
2016-05-03 10:05:44 -04:00
Clinton Gormley d01526b6ab Bumped docs version 2016-05-03 15:35:33 +02:00
Jason Tedor 1385e25542 Add note on configuring assertions in IDEs
This commit adds a note to the contributing docs on how to configure
assertions inside Eclipse and IntelliJ.

Relates #18107
2016-05-03 09:20:19 -04:00
Yannick Welsch 98dba262cf Use object equality to compare versions in IndexSettings (#18103)
Fixes an issue where updating index metadata on a index from a version that it does not have in its static list of known versions fails.
2016-05-03 11:31:56 +02:00
Daniel Mitterdorfer 0a6f40c7f5 Enable HTTP compression by default with compression level 3
With this commit we compress HTTP responses provided the client
supports it (as indicated by the HTTP header 'Accept-Encoding').

We're also able to process compressed HTTP requests if needed.

The default compression level is lowered from 6 to 3 as benchmarks
have indicated that this reduces query latency with a negligible
increase in network traffic.

Closes #7309
2016-05-03 08:53:15 +02:00
Robert Muir 0eed5cf083 Merge pull request #18099 from rmuir/expression_boolean
Add tests/doc for boolean fields with expressions
2016-05-02 19:38:34 -04:00
Robert Muir fff82db681 Add tests/doc for boolean fields with expressions 2016-05-02 18:13:03 -04:00
Robert Muir 693c1f6671 Support geo_point fields in lucene expressions.
Closes #18096
2016-05-02 17:49:21 -04:00
Mike McCandless 0c6d6a5495 also compute completion stats for 2.x shards 2016-05-02 16:14:05 -04:00
Michael McCandless 16c4c251f5 Merge pull request #18094 from mikemccand/completion_stats_once
Don't try to compute completion stats on a reader after we already closed it

Conflicts:
	core/src/main/java/org/elasticsearch/index/shard/IndexShard.java
2016-05-02 14:49:15 -04:00
Jason Tedor 15f33e61b7 Kill redundant conditional in BootstrapCheck#check
This commit removes an unnecessary if statement in Bootstrap#check. The
removed if statement was duplicating the conditionals in the nested if
statements and was merely an artifact of an earlier refactoring.
2016-05-02 12:22:40 -04:00
Jason Tedor 226679c606 Mark MaxMapCountCheck#isSystemCheck as final
This commit marks the method MaxMapCountCheck#isSystemCheck as final as
this method should not be modifiable by inheriting classes (used in
tests).
2016-05-02 11:48:35 -04:00
Adrien Grand 8bdda49f90 Fail automatic string upgrade if the value of `index` is not recognized. #18082
Closes #18062
2016-05-02 17:28:43 +02:00
Jason Tedor 8e178c4f8e Add system bootstrap checks escape hatch
Today when running in production mode the bootstrap checks are
completely unforgiving. But there are cases where an end-user might not
have the ability to modify some of the system-level settings that cause
the bootstrap checks to trip (e.g., guest settings that are inherited
from a host and can not be modified). This commit adds a setting that
allows system-level bootstrap checks to be ignored for these
end-users. We classify certain bootstrap checks into system-level checks
and only those bootstrap checks will be ignored if this flag is
enabled. All other bootstrap checks are still subject to being enforced
if the user is in production mode. We will still log warnings for these
bootstrap checks because the end-user does still need to be made aware
that they are running in a configuration that is less-than-ideal from a
resiliency perspective.

Relates #18088
2016-05-02 10:59:50 -04:00
Isabel Drost-Fromm 372eceb854 Switch to using predicate for testing existing value 2016-05-02 15:41:05 +02:00
Robert Muir 28409e4509 Add support for .empty to expressions, and some docs improvements
Closes #18077
2016-05-02 09:07:25 -04:00
Clinton Gormley 9fee8c76af Added release notes for 5.0.0-alpha2 2016-05-02 14:21:59 +02:00
Isabel Drost-Fromm 4cf5385e4d Use plain random values for generating *SortBuilders 2016-05-02 13:50:00 +02:00
Clinton Gormley 7c8397d99b Update keyword.asciidoc
`ignore_above` doesn't apply to analyzed `text` fields
2016-05-02 13:47:14 +02:00
Todd Dicken 9162fd27a0 Change qoutes to quotes (#18078)
Updated misspelling in documentation
2016-05-02 13:06:07 +02:00
Isabel Drost-Fromm cf1d0d5935 Merge branch 'master' into tests/switch_to_random_value_other_than_for_sort 2016-05-02 11:38:40 +02:00