2073 Commits

Author SHA1 Message Date
Jason Tedor
37becf3dc2 Rename Cache.exceedsSize for clarity 2015-10-07 10:46:09 -04:00
Jason Tedor
44b471b008 Rename LRU and segment locks for clarity 2015-10-07 10:43:56 -04:00
Jason Tedor
1f61384988 Protect against null RemovalListener in setter 2015-10-07 10:40:22 -04:00
Jason Tedor
0fb908178d Clarify Javadoc comment regarding CacheSegment locks 2015-10-07 10:36:05 -04:00
Colin Goodheart-Smithe
ee5d2847b5 more clean up 2015-10-07 15:34:21 +01:00
Colin Goodheart-Smithe
5b23d9abdc more test clean ups 2015-10-07 15:29:13 +01:00
Michael McCandless
7f435e2f4f feedback 2015-10-07 10:18:52 -04:00
Colin Goodheart-Smithe
3313742826 removed defaultRescoreWindow 2015-10-07 15:09:35 +01:00
Clinton Gormley
884215a782 Added version ID for 2.0.0-rc1 2015-10-07 15:13:09 +02:00
Clinton Gormley
90df3c6195 Added bwc indices for 2.0.0-rc1 2015-10-07 15:13:08 +02:00
Britta Weber
871df97e18 Merge pull request #13961 from brwe/function-score-unit-tests
Convert some messy function score tests to unit tests
2015-10-07 14:51:22 +02:00
Britta Weber
bb939f819c use searcher.createNormalizedWeight() instead of query.getWeight() and cleanup 2015-10-07 14:46:47 +02:00
javanna
53f316b540 GeoDistanceRangeQueryBuilder to not change its state when calling toQuery
The geoPoint gets normalized while calling toQuery. That should happen on a copy of the point though, the state of the request should never change as part of toQuery execution. Also updated corresponding test to support point normalization.

Closes #13984
2015-10-07 12:54:24 +02:00
javanna
a024125f8d Java api: GeoDistanceRangeQueryBuilder#getValidationMethod to not take any argument 2015-10-07 12:54:24 +02:00
Britta Weber
ab74e68c5c Merge pull request #13101 from brwe/update-ang
Send response for update request when it timed out
2015-10-07 12:53:22 +02:00
Britta Weber
13d3a3e257 send response for update request when it timed out 2015-10-07 12:51:57 +02:00
Boaz Leskes
bcb3fab6ac Engine: Remove Engine.Create
The `_create` API is handy way to specify an index operation should only be done if the document doesn't exist. This is currently implemented in explicit code paths all the way down to the engine. However, conceptually this is no different than any other versioned operation - instead of requiring a document is on a specific version, we require it to be deleted (or non-existent). This PR removes Engine.Create in favor of a slight extension in the VersionType logic.

There are however a couple of side effects:
- DocumentAlreadyExistsException is removed and VersionConflictException is used instead (with an improved error message)
- Update will reject version parameters if the upsert option is used (it doesn't compute anyway).
- Translog.Create is also removed infavor of Translog.Index (that's OK because their binary format was the same, so we can just read Translog.Index of the translog file)

Closes #13955
2015-10-07 12:37:34 +02:00
Michael McCandless
934827d25f fold feedback 2015-10-06 17:19:39 -04:00
Britta Weber
71aefd5a06 remove option to configure custom config file via CONF_FILE or -Des.default.conf
It is rarely used and was not consistently handled by different distributions anyway.
This commit also adds a test for specifying CONF_DIR when installing plugins and
starting elasticsearch.

relates to #12712 and #12954
closes #5329
closes #13715
2015-10-06 19:02:43 +02:00
javanna
9d1c45f3e0 [TEST] Minor SearchSourceBuilderTests infra changes 2015-10-06 18:13:05 +02:00
javanna
cbcc23b8be [TEST] Simplify SearchSourceBuilderTests setup
Mappings and many modules are not needed here compared to AbstractQueryTestCase, as we will never call toQuery in this other test. Parsing is independent from indices and types as well.
2015-10-06 17:45:41 +02:00
javanna
1915c74e93 Merge branch 'master' into feature/search-request-refactoring 2015-10-06 16:21:58 +02:00
javanna
108f5c5701 Count Request: minScore can be null, its getter should be Float rather than float 2015-10-06 16:16:57 +02:00
javanna
c2fc65352a [TEST] move variable assignment one line above 2015-10-06 16:00:06 +02:00
javanna
fcc60609ae Count api: simplify default handling
For minScore and terminateAfter we can just rely on defaults set to SearchSourceBuilder.
2015-10-06 15:55:34 +02:00
Colin Goodheart-Smithe
10a559348b more fixes for tests 2015-10-06 14:50:48 +01:00
javanna
86be9db7b9 Fix some RequestBuilder#toString that produced broken json
Also restored a couple of old tests around search and count request builder that used to get wiped when calling toString.
2015-10-06 15:46:11 +02:00
Colin Goodheart-Smithe
669a5893bb fixed some NORELEASE comments in tests 2015-10-06 14:36:50 +01:00
Nik Everett
bb2611d2f5 Merge branch 'master' into immutable_map_be_gone 2015-10-06 09:13:58 -04:00
javanna
80d236e1a0 Revert "Count api: simplify default handling and toString representation"
This reverts commit ef286ce972622b15c212067379f1900869c77811.
2015-10-06 14:57:34 +02:00
javanna
ef286ce972 Count api: simplify default handling and toString representation
For minScore and terminateAfter we can just rely on defaults set to SearchSourceBuilder. Also simplified toString representation of CountRequestBuilder
2015-10-06 14:41:03 +02:00
javanna
f39e23b40e pass in QuerySourceBuilder directly to ValidateQueryRequest 2015-10-06 14:39:35 +02:00
javanna
f89de33548 Merge branch 'master' into feature/search-request-refactoring 2015-10-06 14:28:31 +02:00
Nik Everett
82f9e977ad Fully remove and ban ImmutableMap 2015-10-06 08:16:13 -04:00
Britta Weber
d2ca694200 Merge pull request #13933 from brwe/plugin-cli-logging
plugin cli tool should not create empty log files
2015-10-06 14:13:59 +02:00
Britta Weber
9492be65d4 plugin cli tool should not create empty log files
Plugin cli tools configures logging with whatever is in the logging.yml.
If a file appender is configured for any of the logs this will cause creation
of an empty log file. If a plugin was for example installed as root it will
create empty logs at es.home/logs.
This is problematic when for example plugins are installed as root and es is run
as service. Logs will then be created in /usr/share/elasticsearch/logs
and can later not be removed by for example dpkg -r or -purge.

To avoid this, configure the logger to use an appender that writes to the same
output that plugin cli tool does. This allows other components that are called
from Plugin cli tool to write to the same terminal that plugin cli tool writes to
by using the logging mechanism already in place.
The logging conf is not read at all pb plugin cli tool.

As a side effect, the loging level for components that are called
from the plugin command such as the jar hell check can now be configured
with -Des.logger.level which makes it easier to debug the jar hell check.
2015-10-06 14:13:24 +02:00
Adrien Grand
56c2c24f5a Remove ScriptEngineService.execute.
This methods was only used in tests and can be replaced by calling
`ScriptEngineService.executable(compiledScript, vars).run()` instead.
2015-10-06 13:27:27 +02:00
javanna
7e840532c1 Make strategy optional in GeoShapeQueryBuilder readFrom and writeTo
The field is optional everywhere else but in the serialization methods, which causes problems. Also expanded tests so that they can catch this type of problem.

Closes #13963
2015-10-06 13:18:47 +02:00
Britta Weber
473d25beed convert weight functions tests to unit tests 2015-10-06 12:08:59 +02:00
Britta Weber
0915adaa71 convert explain function score tests to unit tests 2015-10-06 11:20:35 +02:00
Adrien Grand
bc98895d18 Remove ScriptEngineService.unwrap.
The ability to unwrap script values is already exposed via ExecutableScript.unwrap.
2015-10-06 10:30:15 +02:00
Michael McCandless
0aabfe383c improve javadocs 2015-10-06 04:27:52 -04:00
Michael McCandless
a082135538 Merge branch 'master' into immediate_shard_active
Conflicts:
	core/src/main/java/org/elasticsearch/index/shard/IndexShard.java
	core/src/main/java/org/elasticsearch/index/shard/ShadowIndexShard.java
	core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java
2015-10-06 04:19:56 -04:00
Michael McCandless
c5971272ee fold feedback 2015-10-06 03:59:37 -04:00
javanna
2fd1cde35e [TEST] move back some test from groovy plugin to core
Relates to #13837

Closes #13945
2015-10-06 09:19:54 +02:00
Nik Everett
34e28ea6ff Remove ImmutableMap$Builder from tests! 2015-10-05 16:37:24 -04:00
Nik Everett
380dbbfb23 Ban ImmutableMap$Builder in core's main
Almost there!
2015-10-05 15:42:17 -04:00
Nik Everett
ba68a8df63 Merge branch 'master' into immutable_map_be_gone 2015-10-05 14:00:53 -04:00
Simon Willnauer
3ab3938501 Merge pull request #13944 from s1monw/simplify_index_modules
Remove unneeded Module abstractions
2015-10-05 17:43:20 +02:00
Simon Willnauer
fce55a15b8 Remove unneeded Module abstractions
These abstractions don't really do anything nor can they be extended.
We can just fold them into IndexModule for now. There are more but they
are tricky due to some test dependencies which I need to resolve first.
2015-10-05 17:33:03 +02:00