Commit Graph

11963 Commits

Author SHA1 Message Date
Robert Muir f241236af0 Merge pull request #11194 from rmuir/mockito
allow mockito to be used in tests
2015-05-15 16:52:44 -04:00
Robert Muir b2a0ed3878 allow mockito to be used in tests 2015-05-15 16:33:24 -04:00
Robert Muir ae1d7e4ceb Merge branch 'master' of github.com:rmuir/elasticsearch 2015-05-15 16:33:08 -04:00
Robert Muir fc73540aac include rest tests in test-framework.jar
Closes #11192 which I accidentally already closed.

Squashed commit of the following:

commit f23faccddc2a77a880841da4c89c494edaa2aa46
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 16:04:55 2015 -0400

    Simplify this FileUtils even more: its either from the filesystem, or the classpath,
    not both. Its already trying 4 different combinations of crazy paths for either of these anyway.

commit c7016c8a2b5a6043e2ded4b48b160821ba196974
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 14:21:37 2015 -0400

    include rest tests in test-framework jar
2015-05-15 16:16:24 -04:00
Robert Muir 97ffb2b4fd include rest tests in test-framework.jar
Closes #11192 which I accidentally already closed.

Squashed commit of the following:

commit f23faccddc2a77a880841da4c89c494edaa2aa46
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 16:04:55 2015 -0400

    Simplify this FileUtils even more: its either from the filesystem, or the classpath,
    not both. Its already trying 4 different combinations of crazy paths for either of these anyway.

commit c7016c8a2b5a6043e2ded4b48b160821ba196974
Author: Robert Muir <rmuir@apache.org>
Date:   Fri May 15 14:21:37 2015 -0400

    include rest tests in test-framework jar
2015-05-15 16:15:23 -04:00
Simon Willnauer 217fd4443a Make SearchFactory static class in InternalEngine
Now that lucene provides a way to identify if the warming reader is
the first initial opened reader we can detach this class from the
enclosing and make it static. This is important since it might access
not fully initialized members of the enclosing class since it's initialized
and used during constructor invocation.
2015-05-15 22:02:00 +02:00
javanna a843008b17 Highlighting: require_field_match set to true by default
The default `false` for `require_field_match` is a bit odd and confusing for users, given that field names get ignored by default and every field gets highlighted if it contains terms extracted out of the query, regardless of which fields were queries. Changed the default to `true`, it can always be changed per request.

Closes #10627
Closes #11067
2015-05-15 21:38:45 +02:00
Clinton Gormley 9d71816cd2 Docs: Fixed explanation of AUTO fuzziness
Closes #11186
2015-05-15 21:25:11 +02:00
Scott Chamberlain ae599f93a7 Added an R client to community clients page
I maintain an R client called `elastic` at https://github.com/ropensci/elastic
2015-05-15 21:25:11 +02:00
javanna 46c521f7ec Highlighting: nuke XPostingsHighlighter
Our own fork of the lucene PostingsHighlighter is not easy to maintain and doesn't give us any added value at this point. In particular, it was introduced to support the require_field_match option and discrete per value highlighting, used in case one wants to highlight the whole content of a field, but get back one snippet per value. These two features won't
 make it into lucene as they slow things down and shouldn't have been supported from day one on our end probably.

One other customization we had was support for a wider range of queries via custom rewrite etc. (yet another way to slow
 things down), which got added to lucene and works much much better than what we used to do (instead of or rewrite, term
s are pulled out of the automata for multi term queries).

Removing our fork means the following in terms of features:
- dropped support for require_field_match: the postings highlighter will only highlight fields that were queried
- some custom es queries won't be supported anymore, meaning they won't be highlighted. The only one I found up until now is the phrase_prefix. Postings highlighter rewrites against an empty reader to avoid slow operations (like the ones that we were performing with the fork that we are removing here), thus the prefix will not be expanded to any term. What the postings highlighter does instead is pulling the automata out of multi term queries, but this is not supported at the moment with our MultiPhrasePrefixQuery.

Closes #10625
Closes #11077
2015-05-15 20:41:33 +02:00
markharwood caf723570d Aggregations improvement: exclude clauses with a medium/large number of clauses fail.
The underlying automaton-backed implementation throws an error if there are too many states.

This fix changes to using an implementation based on Set lookups for lists of excluded terms.
If the global-ordinals execution mode is in effect this implementation also addresses the slowness identified in issue 11181 which is caused by traversing the TermsEnum - instead the excluded terms’ global ordinals are looked up individually and unset the bits of acceptable terms. This is significantly faster.

Closes #11176
2015-05-15 19:17:53 +01:00
Adrien Grand 1a967ce267 Merge pull request #11180 from jpountz/enhancement/faster_scan
Search: Make SCAN faster.
2015-05-15 19:26:11 +02:00
Clinton Gormley 3a69b65e88 Docs: Fixed the backslash escaping on the pattern analyzer docs
Closes #11099
2015-05-15 18:40:16 +02:00
Adrien Grand 22bba91a16 Search: Make SCAN faster.
When scrolling, SCAN previously collected documents until it reached where it
had stopped on the previous iteration. This makes pagination slower and slower
as you request deep pages. With this change, SCAN now directly jumps to the
doc ID where is had previously stopped.
2015-05-15 18:23:10 +02:00
Jun Ohtani 597c53a0bb Add migrationi note for AnalyzeRequest 2015-05-16 00:25:53 +09:00
Adrien Grand c5e74a8d72 Merge pull request #11141 from jpountz/fix/fieldnameanalyzer_leniency
Mappings: Make FieldNameAnalyzer less lenient.
2015-05-15 16:41:44 +02:00
Adrien Grand bf599d68dd Merge pull request #11042 from jpountz/feature/aggs_missing
Aggs: Make it possible to configure missing values.
2015-05-15 16:33:29 +02:00
Adrien Grand 32e23b9100 Aggs: Make it possible to configure missing values.
Most aggregations (terms, histogram, stats, percentiles, geohash-grid) now
support a new `missing` option which defines the value to consider when a
field does not have a value. This can be handy if you eg. want a terms
aggregation to handle the same way documents that have "N/A" or no value
for a `tag` field.

This works in a very similar way to the `missing` option on the `sort`
element.

One known issue is that this option sometimes cannot make the right decision
in the unmapped case: it needs to replace all values with the `missing` value
but might not know what kind of values source should be produced (numerics,
strings, geo points?). For this reason, we might want to add an `unmapped_type`
option in the future like we did for sorting.

Related to #5324
2015-05-15 16:26:58 +02:00
Adrien Grand 3e215e720a Merge pull request #11144 from jpountz/fix/remove_hppc_esoteric_dep
Internal: remove dependency on hppc:esoteric.
2015-05-15 16:25:51 +02:00
Martijn van Groningen 719252a138 Merge pull request #11183 from martijnvg/parent-child/remove_id_cache_from_stats_and_clear_cache_apis
Removed `id_cache` from stats and cat apis.
2015-05-15 14:39:35 +02:00
Martijn van Groningen ece18f162e Removed `id_cache` from stats and cat apis.
Also removed the `id_cache` option from the clear cache api.

Closes #5269
2015-05-15 14:06:18 +02:00
Jun Ohtani 3a1a4d3e89 Analysis: Add multi-valued text support
Add support array text as a multi-valued for AnalyzeRequestBuilder
Add support array text as a multi-valued for Analyze REST API
Add docs

Closes #3023
2015-05-15 20:01:10 +09:00
Adrien Grand 66921ffa50 Remove unused docidset-related code. 2015-05-15 12:33:19 +02:00
Alexander Reelsen f05808d59e HttpServer: Support relative plugin paths in configuration
When specifying relative paths on startup, handling plugin
paths failed due to recently added security fix. This fix
ensures normalization of the plugin path as well.

In addition a new matcher has been added to easily check for a
status code of an HTTP response likes this

assertThat(response, hasStatus(OK));

Closes #10958
2015-05-15 08:40:40 +02:00
Nicholas Canzoneri 8831ae6e5c Add index name to log statements when settings update fails
When an index setting is invalid and fails to be set, a WARN statement
is logged but it doesn't contain the index name, making tracking down
and fixing the problem more difficult. This commit adds the index name
to the log statement.
2015-05-14 18:44:48 -04:00
Ryan Ernst 91aeea9c66 Make highlighter check source enabled again instead of source complete...for now. 2015-05-14 15:21:07 -07:00
Areek Zillur ac4942b5a7 [TEST] improve Phrase Collate filter test 2015-05-14 18:16:03 -04:00
Lee Hinman 179dad69b6 [DOCS] Add DNS SRV discovery plugin 2015-05-14 16:02:59 -06:00
Ryan Ernst 7cacfa0769 Change includes/excludes back to null based for now, since it
complicates serialization and causes a number of test failures.
2015-05-14 14:58:06 -07:00
Ryan Ernst a6b0f0a8c1 Merge pull request #11171 from rjernst/fix/11116
Mappings: Add back support for enabled/includes/excludes in _source
2015-05-14 14:41:47 -07:00
Ryan Ernst 0e14c6d256 Fix includes/excludes to be handled on merge conflict checking when they
are null
2015-05-14 14:36:26 -07:00
Areek Zillur 7efc43db25 Re-structure collate option in PhraseSuggester to only collate on local shard.
Previously, collate feature would be executed on all shards of an index using the client,
this leads to a deadlock when concurrent collate requests are run from the _search API,
due to the fact that both the external request and internal collate requests use the
same search threadpool.

As phrase suggestions are generated from the terms of the local shard, in most cases the
generated suggestion, which does not yield a hit for the collate query on the local shard
would not yield a hit for collate query on non-local shards.

Instead of using the client for collating suggestions, collate query is executed against
the ContextIndexSearcher. This PR removes the ability to specify a preference for a collate
query, as the collate query is only run on the local shard.

closes #9377
2015-05-14 17:21:53 -04:00
Areek Zillur af6b69e791 Ensure empty completion entries are never indexed
closes #10987
2015-05-14 16:48:49 -04:00
Ryan Ernst d31ce43452 Mappings: Add back support for enabled/includes/excludes in _source
This adds back the ability to disable _source, as well as set includes
and excludes. However, it also restricts these settings to not be
updateable. enabled was actually already not modifiable, but no
conflict was previously given if an attempt was made to change it.

This also adds a check that can be made on the source mapper to
know if the the source is "complete" and can be used for
purposes other than returning in search or get requests. There is
one example use here in highlighting, but more need to be added
in a follow up issue (eg in the update API).

closes #11116
2015-05-14 13:04:39 -07:00
Jack Conradson df59288b72 Fixed a broken import in MultiValueMode. 2015-05-14 09:53:26 -07:00
Jack Conradson a5c0ac0d67 Scripting: Add Multi-Valued Field Methods to Expressions
Add methods to operate on multi-valued fields in the expressions language.
Note that users will still not be able to access individual values
within a multi-valued field.

The following methods will be included:

* min
* max
* avg
* median
* count
* sum

Additionally, changes have been made to MultiValueMode to support the
new median method.

closes #11105
2015-05-14 08:27:24 -07:00
Robert Muir 1d3a8ad36a Merge pull request #11163 from rmuir/jna_nosys
Use our provided JNA library, versus one installed on the system
2015-05-14 09:03:05 -04:00
Robert Muir 30cdd4c03b Use our provided JNA library, versus one installed on the system
which might be older and not work.
2015-05-14 00:09:44 -04:00
Robert Muir 3ee9ae6f9c Merge pull request #11152 from rmuir/party_time
Add test group for third-party tests
2015-05-13 16:11:25 -04:00
Robert Muir 3dd706f1e6 Add these two props for consistency, so we aren't confused
when we deduplicate with elasticsearch-parent
2015-05-13 14:56:29 -04:00
Robert Muir c949ce00e8 Add test group for third-party tests 2015-05-13 14:34:53 -04:00
Robert Muir 33fd25083e Merge pull request #11134 from rmuir/tests_config
Add tests.config support to BootstrapForTesting
2015-05-13 11:35:16 -04:00
Adrien Grand b64e54c424 Merge pull request #11137 from jpountz/enhancement/geo_queries
Query DSL: Make geo filters queries.
2015-05-13 17:27:15 +02:00
Simon Willnauer 869baeea0c Don't throw an exception if repositories are unregister with match all
Today we barf if repositories are unregistered with a `*` pattern. This
happens on almost every test and adds weird log messages. I dont' think
we should barf in that case.

Closes #11113
2015-05-13 17:01:04 +02:00
Simon Willnauer 6a43fe348d Fail recovery if retry recovery if resetRecovery fails
This might fail if the shard is closed for instance. This will leak
a shard lock causing the shard being locked on this node forever.
2015-05-13 16:47:18 +02:00
javanna add18a5c99 Java api: remove duplicated buildAsBytes and corresponding toString methods
We have some builders, specifically query builders, `SearchSourceBuilder`, `QuerySourceBuilder` and `SuggestBuilder`, that implement `ToXContent` and also allow to build their content as bytes by simply creating a `BytesReference` that holds their json (or yaml etc.) content (`buildAsBytes` methods). They can also print out their content through `toString`. Made sure that those common methods are in one single place and reused where needed.

Also, merged `QueryBuilder` and `BaseQueryBuilder` and made `QueryBuilder` an abstract class instead of an interface.

Closes #11063
2015-05-13 16:14:16 +02:00
javanna d2765a2e26 Java api: add missing rewrite parameter to FuzzyQueryBuilder
We parse the rewrite field in FuzzyQueryParser but we don't allow to set it via FuzzyQueryBuilder for our java api users. Added missing field and setter.

Closes #11130
Closes #11139
2015-05-13 15:46:57 +02:00
Adrien Grand 5c9c4776cd Internal: remove dependency on hppc:esoteric.
The esoteric classifier contains in particular maps that take bytes or doubles
as keys. In the byte case, we can just use integer, and in the double case we
can use their long bits instead.
2015-05-13 14:13:10 +02:00
Dawid Weiss 491b00c4ec Updating to HPPC-0.7.1
Close #11035
2015-05-13 13:53:14 +02:00
Adrien Grand 472cc0af08 Merge pull request #11142 from jpountz/feature/bool_filter
Query DSL: Add `filter` clauses to `bool` queries.
2015-05-13 12:25:32 +02:00