Commit Graph

11713 Commits

Author SHA1 Message Date
Robert Muir e71553556e remove tests.processors, this is a reproducibility nightmare 2015-04-17 18:32:52 -04:00
Robert Muir e3e4c02379 nobody wants to look at bytecode 2015-04-17 17:16:03 -04:00
Robert Muir c7c4045e19 speed up directory wrapping 2015-04-17 17:12:55 -04:00
Julie Tibshirani dc1742785d Mappings: Fixed an equality check in StringFieldMapper.
The check was ineffective and was causing search_quote_analyzer to be added to the mapping unnecessarily.

Closes #10357
closes #10359
2015-04-17 13:18:53 -07:00
Ryan Ernst 7faa9a045a Change nocommit checks to not happen on intellij files (where there can
be a TODO task named eg Nocommits).
2015-04-17 12:54:15 -07:00
Michael McCandless fdc7db7b11 Test back compat of 0.90.6 index
Add back UpgradeReallyOldIndexTest from 1.x, but test 0.90.6 index
(Lucene 4.x) instead of 0.20 (Lucene 3.x), and make sure
only_ancient_segments works.

Closes #10639
2015-04-17 14:02:53 -04:00
Robert Muir a985c972f2 suppress all filesystems here due to jimfs brokenness 2015-04-17 12:28:29 -04:00
Robert Muir b113fbd283 fix nocommits 2015-04-17 11:57:45 -04:00
Robert Muir 57b5e06dd6 disable extras for test, clean up some stragglers 2015-04-17 11:35:20 -04:00
Robert Muir 5718e5616a fail the build if you typo test name 2015-04-17 09:45:38 -04:00
Robert Muir 7afa241e19 make stacktraces reasonable 2015-04-17 09:22:28 -04:00
Robert Muir d08322e000 disable WindowsFS for this test. unsure if its a problem on real windows too 2015-04-17 09:21:54 -04:00
Robert Muir 2d9e5b4807 fix FileSystemUtils failures 2015-04-17 08:26:25 -04:00
Robert Muir c421948300 upgrade to lucene 5.2 r1674278 2015-04-17 07:58:20 -04:00
Robert Muir 89b9f0e541 Merge branch 'master' into mockfilesystem 2015-04-17 07:55:48 -04:00
Martijn van Groningen 161e74029f Core: Fix NPE. The `future` field is set from a different thread.
Closes #10630
2015-04-17 10:46:22 +02:00
Adrien Grand af191d7888 Merge pull request #10641 from jpountz/upgrade/lucene-5.2-snapshot-1674183
Upgrade to Lucene-5.2-snapshot-1674183.
2015-04-17 10:43:51 +02:00
Tanguy Leroux b3d91b1cbb Doc: Change the wording a bit for the HOSTNAME environment variable
I should have done this while merging #9474.
2015-04-17 10:24:50 +02:00
Tanguy Leroux a806314e2c Merge pull request #9474 from AndreKR/export-hostname-for-config
Export the hostname as environment variable
2015-04-17 10:17:55 +02:00
Adrien Grand fd416d5ed5 Upgrade to Lucene-5.2-snapshot-1674183. 2015-04-17 10:05:30 +02:00
André Hänsel c107f0bcb9 Export the hostname as environment variable and mention it in the docs 2015-04-17 09:17:02 +02:00
Simon Willnauer 630544cc69 [TEST] Use lowercase index names in test 2015-04-17 08:34:51 +02:00
Robert Muir 007e8f1d5c remove redundant confusing output 2015-04-17 02:05:59 -04:00
Robert Muir 65367f5efa fix many test bugs by minimizing URI handling 2015-04-16 21:24:07 -04:00
Ryan Ernst 84b20c0e0e revert change to use .getPath(), it doens't work on windows 2015-04-16 16:05:06 -07:00
Robert Muir bac99cc964 note these test seeds for investigation 2015-04-16 18:38:45 -04:00
Robert Muir 370819a98a Merge branch 'master' into mockfilesystem 2015-04-16 18:26:12 -04:00
Simon Willnauer 5f9bac435e [TEST] mute test and remove once #10638 is in 2015-04-16 22:56:52 +02:00
Robert Muir 410f1790d1 Merge pull request #10635 from rmuir/test_status_bar
Add tests progress indicator
2015-04-16 13:44:20 -04:00
Robert Muir 41d0e60dc7 Add tests progress indicator
Looks like this:

    Suite: org.elasticsearch.search.aggregations.bucket.HistogramTests
    Completed [10/713] on J0 in 8.32s, 27 tests

    Suite: org.elasticsearch.indices.state.OpenCloseIndexTests
    Completed [11/713] on J2 in 16.23s, 20 tests

Upgrades randomizedtesting to 2.1.13.
2015-04-16 13:29:51 -04:00
Robert Muir 8ceb495007 improve REPRODUCE WITH 2015-04-16 09:56:56 -04:00
Robert Muir 68267f4bb6 these leaks are plugged 2015-04-16 09:42:13 -04:00
Simon Willnauer 4fccb48ae8 [TEST] Wait for green after restore indices 2015-04-16 14:10:36 +02:00
Michael McCandless 399f0ccce9 Core: add only_ancient_segments to upgrade API, so only segments with an old Lucene version are upgraded
This option defaults to false, because it is also important to upgrade
the "merely old" segments since many Lucene improvements happen within
minor releases.

But you can pass true to do the minimal work necessary to upgrade to
the next major Elasticsearch release.

The HTTP GET upgrade request now also breaks out how many bytes of
ancient segments need upgrading.

Closes #10213

Closes #10540

Conflicts:
	dev-tools/create_bwc_index.py
	rest-api-spec/api/indices.upgrade.json
	src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java
	src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java
	src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java
	src/main/java/org/elasticsearch/index/engine/InternalEngine.java
	src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java
	src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
	src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexTest.java
2015-04-16 05:24:33 -04:00
Adrien Grand 5806e85771 Merge pull request #10593 from jpountz/fix/dynamic_mappings_updates
Mappings: Same code path for dynamic mappings updates and updates coming from the API.

Close #10593
2015-04-16 10:17:38 +02:00
Adrien Grand 563e704881 Mappings: Same code path for dynamic mappings updates and updates coming from the API.
We have two completely different code paths for mappings updates, depending on
whether they come from the API or are guessed based on the parsed documents.
This commit makes dynamic mappings updates execute like updates from the API.

The only change in behaviour is that a document that fails parsing can not
modify mappings anymore (useful to prevent issues such as #9851). Other than
that, this change should be fairly transparent to users but working this way
opens doors to other changes such as validating dynamic mappings updates on the
master node (#8688).

The way it works internally is that Mapper.parse now returns a Mapper instead
of being void. The returned Mapper represents a mapping update that has been
performed in order to parse the document. Mappings updates are propagated
recursively back to the root mapper, and once parsing is finished, we check
that the mappings update can be applied, and either fail the parsing if the
update cannot be merged (eg. because of a concurrent mapping update from the
API) or merge the update into the mappings.

However not all mappings updates can be applied recursively, `copy_to` for
instance can add mappings at totally different places in the tree. Because of
it I added ParseContext.rootMapperUpdates which `copy_to` fills when the
field to copy data to does not exist in the mappings yet. These mappings
updates are merged from the ones generated by regular parsing.

One particular mapping update was the `auto_boost` setting on the `all` root
mapper. Being tricky to work on, I removed it in favour of search-time checks
that payloads have been indexed.

One interesting side-effect of the change is that concurrency on ObjectMapper
is greatly simplified since we do not have to care anymore about having
concurrent dynamic mappings and API updates.
2015-04-16 10:16:59 +02:00
Ryan Ernst 93e591c5fa Enabled mockfs on base test class. All tests pass. Added suppressions
with nocommits for tests that need to be investigated.
2015-04-16 00:25:02 -07:00
Ryan Ernst 4d44fa0192 Fixed test using .getURI() for resource paths to use .getPath() instead. We should probalby ban .getURI()?
Also added a couple nocommits for some issues with tests after mockfs is
working again. But I also re-enabled the mockfs suppression in the base
test case for now.
2015-04-15 23:09:21 -07:00
Robert Muir e5a699fa05 cutover to lucenetestcase 2015-04-16 00:58:02 -04:00
Robert Muir 401452608e ensure security manager is always on if it should be 2015-04-15 21:20:13 -04:00
Robert Muir fb481bc145 Merge branch 'master' into mockfilesystem
Conflicts:
	src/main/java/org/elasticsearch/index/translog/Translog.java
	src/main/java/org/elasticsearch/index/translog/fs/FsTranslog.java
2015-04-15 18:34:24 -04:00
Robert Muir 6ac4d6daef contain filesystem access 2015-04-15 18:23:30 -04:00
Lee Hinman 4f8ea78356 [TEST] Supress filesystems for base test classes 2015-04-15 15:49:56 -06:00
Lee Hinman 2d768bb3e8 [TEST] Fix ShadowEngineTests writing to CWD
After #a3f0789 these tests fail because the translog getPath returns a
path that is a CWD path (even though it is unneeded)
2015-04-15 15:37:55 -06:00
Ryan Ernst a3f078985b Tests: Forbid tests from writing to CWD
Allowing tests writing to the working directory can mask problems.
For example, multiple tests running in the same jvm, and using the
same relative path, may cause issues if the first test to run
leaves data in the directory, and the second test does not remember
to cleanup the path before using it.

This change adds security manager rules to disallow tests writing
to the working directory. Instead, tests create a temp dir with
the existing test framework.

closes #10605
2015-04-15 12:45:20 -07:00
Areek Zillur c326738193 [FIX] Make GeoContext mapping idempotent
closes #10581
closes #8937
2015-04-15 12:01:24 -04:00
Robert Muir 6d3154e39f Merge pull request #10612 from rmuir/lucene_r1673726
upgrade to 5.2 r1673726
2015-04-15 10:37:19 -04:00
Robert Muir b1afcdb71d upgrade to 5.2 r1673726 2015-04-15 10:28:31 -04:00
Boaz Leskes 3dd37c06ff Test: testTranslogReplayWithFailure didn't allow for MockDirectoryWrapper being optional 2015-04-14 20:36:32 +02:00
Alex Ksikes d339ee4005 Term Vectors: terms filtering
This adds a new feature to the Term Vectors API which allows for filtering of
terms based on their tf-idf scores. With `dfs` option on, this could be useful
for finding out a good characteric vector of a document or a set of documents.
The parameters are similar to the ones used in the MLT Query.

Closes #9561
2015-04-14 19:11:09 +02:00