Commit Graph

12188 Commits

Author SHA1 Message Date
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
Simon Willnauer 5d4db0edde Remove accidential modification 2015-05-15 17:03:45 +02:00
Simon Willnauer 9f81ae4845 Merge branch 'master' into feature/translog_checkpoints
Conflicts:
	src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java
2015-05-15 17:01:23 +02:00
Michael McCandless a42d92df21 Small fixes:
- rename one method
  - move "generation == null" check under existing "if (createNew == false)"
  - fix typo/whitespace
  - add a TODO
2015-05-15 10:47:17 -04: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
Britta Weber 7a8d08a4a3 Merge remote-tracking branch 'origin/master' into feature/synced_flush 2015-05-15 10:35:36 +02:00
Britta Weber 36e6718bf5 some more docs and cleanup 2015-05-15 10:35:15 +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
Simon Willnauer 50c771be29 [ENGINE] Signal when a new index is created also in Translog creation code
Clarify when a new tranlog should be created by passing the
same create flag to the IndexWriter as well as to the Translog creation
2015-05-15 08:31:56 +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
Simon Willnauer 08d7638ed1 apply review comments 2015-05-14 22:57:53 +02: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
Simon Willnauer 91cfba3485 move reading opSize into the catch block to transform EOF into TruncatedTranslogException 2015-05-13 21:12:54 +02: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
Simon Willnauer 19155d8fd8 Simplify new translog creation - pending files are not needed anymore 2015-05-13 20:52:59 +02:00
Robert Muir c949ce00e8 Add test group for third-party tests 2015-05-13 14:34:53 -04:00
Simon Willnauer 96df7ba7eb Applied review comments from @mikemccand
- Renamed TranslogSnapshot to MultiSnapshot
 - moved legacy logic for trucation into LegacyTranslogReaderBase
 - made several methods private and pkg private where applicable
 - renamed arguments for consistency
2015-05-13 20:32:25 +02:00
Britta Weber 5eafc9198f rename as requested by Luca 2015-05-13 18:06:59 +02:00
Britta Weber 3a9c2bd639 fix test 2015-05-13 18:05:32 +02:00
Britta Weber 2b03a03c0c Merge remote-tracking branch 'origin/master' into feature/synced_flush 2015-05-13 18:00:18 +02: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
Britta Weber 471cd54e39 fix api hangs if no shards allocated 2015-05-13 17:05:29 +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