Commit Graph

14139 Commits

Author SHA1 Message Date
Adrien Grand d7af88631f Merge pull request #11538 from Collaborne/docs-sort-sr-typo
Fix a typo in the documentation: six_hun -> "narrower"
2015-07-08 19:22:03 +02:00
William Webber 6b40169b59 Only load term statistics if required 2015-07-08 18:43:08 +02:00
Jason Tedor cbcc553912 Merge pull request #12114 from jasontedor/feature/11527
Add support for retrieving fields in bulk updates

This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API
but not for the bulk update API.

Closes #11527
2015-07-08 12:25:32 -04:00
johnpickett 72bf32e398 Fix grammar
Added 'to' on line 79 to make consistent and fix grammar.
2015-07-08 18:21:03 +02:00
Jason Tedor b61709c716 Add support for retrieving fields in bulk updates
This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API
but not for the bulk update API.

Closes #11527
2015-07-08 12:06:20 -04:00
Ryan Ernst df41d0c3ba Merge pull request #12130 from rjernst/fix/doc-mapper-in-engine
Remove mapper references from Engines
2015-07-08 08:58:27 -07:00
Tanguy Leroux 19e348a82c Update OS stats 2015-07-08 17:48:10 +02:00
Jakob Reiter daa5a8da24 Fixed typos in examples on common-terms-query.asciidoc. JSON was invalid before 2015-07-08 17:47:04 +02:00
Ryan Ernst 8696a81a8e Internal: Remove mapper references from Engines
This was previously necessary with MapperAnalyzer, but there are no more uses.
2015-07-08 08:45:11 -07:00
Adrien Grand acf8e2e917 Merge pull request #8352 from jpountz/fix/match_rewrite
Minor fixes to the `match` query.
2015-07-08 17:03:18 +02:00
Adrien Grand da5fa6c4f3 Minor fixes to the `match` query.
Fixed documentation since the default rewrite method for fuzzy queries is to
select top terms, fixed usage of the fuzzy rewrite method, and removed unused
`rewrite` parameter.

Close #6932
2015-07-08 16:51:41 +02:00
Adrien Grand 8661ab0bf9 Merge pull request #12129 from jpountz/enhancement/expose_blended_rewrite
Expose Lucene's new TopTermsBlendedFreqScoringRewrite.
2015-07-08 16:50:13 +02:00
David Pilato 02874ea411 [build] explicitly add http-client dependency
As discussed in the PR https://github.com/elastic/elasticsearch/pull/12036#issuecomment-119584570
2015-07-08 16:17:27 +02:00
Adrien Grand 8238f497d8 Expose Lucene's new TopTermsBlendedFreqScoringRewrite.
This rewrite method is interesting because it computes scores as if all terms
had the same frequencies, which avoids disappointments with ranking when a fuzzy
query ranks typos first given that they are less frequent than the correct term.
2015-07-08 16:01:47 +02:00
David Pilato 88cf29b903 [build] cloud-aws doesn't register s3 repos anymore
Reported in https://github.com/elastic/elasticsearch/issues/11647#issuecomment-118523861

> btw, I think you broke some plugins on Master, cloud-aws doesn't register s3 repos anymore.

```
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
  at org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)
  while locating org.elasticsearch.repositories.s3.S3Repository
  while locating org.elasticsearch.repositories.Repository

1 error
	at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
	at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
	at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
	at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:140)
	at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69)
	at org.elasticsearch.repositories.RepositoriesService.createRepositoryHolder(RepositoriesService.java:404)
	at org.elasticsearch.repositories.RepositoriesService.registerRepository(RepositoriesService.java:368)
	at org.elasticsearch.repositories.RepositoriesService.access$100(RepositoriesService.java:55)
	at org.elasticsearch.repositories.RepositoriesService$1.execute(RepositoriesService.java:110)
	at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:378)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:209)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:179)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
	at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:129)
	at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:432)
	at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:414)
	at org.elasticsearch.cloud.aws.InternalAwsS3Service.getClient(InternalAwsS3Service.java:153)
	at org.elasticsearch.cloud.aws.InternalAwsS3Service.client(InternalAwsS3Service.java:82)
	at org.elasticsearch.repositories.s3.S3Repository.<init>(S3Repository.java:125)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)
	at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
	at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)
	at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:54)
	at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
	at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)
	at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
	at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
	at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)
	at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)
	at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
	at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)
	at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
	at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
	... 13 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 37 more
```

Closes #12034.
2015-07-08 15:37:24 +02:00
David Pilato 9519100eca [test] fix missing REST specs
Something went wrong with my last commit.

Fixing it here.
2015-07-08 15:22:43 +02:00
David Pilato 97019ce3e9 [python] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato c99bc81bdd [Javascript] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 19b2e77bc2 [Stempel] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 7a1255d520 [Smartcn] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 4738fa04b1 [ICU] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091

Tests can use more than one JVM

We don't need anymore to set the number of jvm to run tests as we moved IT to Rest Tests
For all plugins but cloud plugins which will require another way for running integration tests.
2015-07-08 15:19:26 +02:00
Tanguy Leroux 1c5d8efd47 Process Stats: remove sigar specific stats from APIs and add JMX implementation 2015-07-08 15:12:45 +02:00
Adrien Grand fbab48e451 Clean up handling of missing values when merging shard results on the coordinating node.
Today shards are responsible for producing one sort value per document, which
is later used on the coordinating node to resolve the global top documents.
However, this is problematic on string fields with
`missing: _first, order: desc` or `missing: _last, order: asc` given that there
is no such thing as a string that compares greater than any other string. Today
we use a string containing a single code point which is the maximum allowed code
point but this is a hack: instead we should inform the coordinating node that
the document had no value and let it figure out how it should be sorted
depending on whether missing values should be sorted first or last.

Close #9155
2015-07-08 14:48:35 +02:00
Simon Willnauer f9a45fd605 Cleanup ShardRoutingState uses and hide implementation details of ClusterInfo 2015-07-08 14:36:26 +02:00
Shay Banon 097b132238 Consolidate ShardRouting construction
Simplify and consolidate ShardRouting construction. Make sure that there is really only one place it gets created, when a shard is first created in unassigned state, and from there on, it is either copy constructed or built internally as a target for relocation.
This change helps make sure within our codebase data carries over by the ShardRouting is not lost as the shard goes through transitions, and can help simplify the addition of more data on it (like uuid).
For testing, a centralized TestShardRouting allows to create testable versions of ShardRouting, that are not needed to be as strict as the non test codebase. This can be cleanup more later on, but it is a good start.
closes #12125
2015-07-08 14:15:28 +02:00
Alex Ksikes a6c0007325 Fix FuzzyQuery to properly handle Object, number, dates or String.
This makes FuzzyQueryBuilder and Parser take an Object as a value using the
same logic as termQuery, so that numbers, dates or Strings would be properly
handled.

Relates #11865
Closes #12020
2015-07-08 10:41:03 +02:00
David Pilato 786d034d75 [phonetic] move integration tests to REST tests
Fix for #12095
2015-07-08 10:17:43 +02:00
David Pilato b970fbacee [phonetic] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 10:04:18 +02:00
Simon Willnauer b5452074a3 [TEST] Only sanitly check time values in stats
Testing the actual time value even with lowerbounds is very tricky
and fails very often. We should really just sanity check the values.
2015-07-08 10:02:24 +02:00
Tanguy Leroux 26fd4ba95b Docs: fix wrong title level 2015-07-08 09:29:21 +02:00
Robert Muir fd1f63529a Merge pull request #12117 from rmuir/windows_integ_tests
Get integration tests working on windows.
2015-07-08 02:58:13 -04:00
Robert Muir 8ef73b7dba Get integration tests working on windows.
We also run our license checker in `mvn verify`, but there
are problems with checksum calculation on windows there, so I've
disabled the license checker on windows to prevent those false fails.
2015-07-08 02:40:00 -04:00
Robert Muir 5c53f516ca Merge pull request #12112 from rmuir/fixtophints
Fix tophints noise.
2015-07-08 00:56:09 -04:00
Robert Muir 8f0b7164b7 Fix tophints noise.
previously this was done wrong, junit4 ant tasks were brought into
the test classpath. This created jar hell for tests, and also encouraged
people to use _internal_ stuff like its bundled guava in tests.

also the task was set to be lenient and ignore errors. And we were
passing in a messload of unnecessary classpaths to run this. It
only needs the module classpath: the explicit ant dependencies we declare.
2015-07-08 00:45:02 -04:00
Ryan Ernst 8d9053a841 Merge pull request #12089 from rjernst/refactor/field-mapper-collapse
Remove AbstractFieldMapper
2015-07-07 21:36:47 -07:00
Robert Muir 2111385607 Merge pull request #12111 from rmuir/printPID
print PID when starting ES in integ tests too.
2015-07-08 00:24:37 -04:00
Robert Muir fcddec532a Use extract-pid when killing, too 2015-07-08 00:10:25 -04:00
Robert Muir 7a9f74de80 print PID when starting ES in integ tests too. 2015-07-08 00:04:27 -04:00
Ryan Ernst a7df6eecdb Merge pull request #12109 from rjernst/fix/jar-hell-path
Change JarHell to operate on Path instead of URL
2015-07-07 20:19:14 -07:00
Ryan Ernst 8c45c7f482 Internal: Change JarHell to operate on Path instead of URL
This converts the tracking of jars and classes in JarHell to use
Path objects, instead of URL. This makes for nicer printing
of the underlying path when an error does occur.
2015-07-07 20:14:23 -07:00
Robert Muir fb62d945aa isolate integ tests a little better.
They are mostly just ES clients, but we can set tempdir and the usual
stuff to contain them better.
2015-07-07 23:10:18 -04:00
Ryan Ernst bab1323d1e Fix JarHell check to properly convert URL to Path so it can be compared
to java.home
2015-07-07 19:44:15 -07:00
Robert Muir ba96dc3616 Merge pull request #12107 from rmuir/harden_integration_tests
Harden integration tests setup/teardown more
2015-07-07 21:05:06 -04:00
Robert Muir 2cf7adf731 Merge branch 'master' into harden_integration_tests 2015-07-07 20:14:50 -04:00
Jason Tedor 83f6587e61 Default fuzzy transpositions to true
This commit defaults fuzzy_transpositions on fuzzy queries to true. This means that by default, tranpositions will now count as a single
edit.

Closes #9278
2015-07-07 20:13:56 -04:00
Robert Muir 85a25bdf73 harden logic around integ test workspace and process mgmt
there is more to do here, but this is already a lot more robust.

* don't clean workspace in teardown, it might be useful for debugging if stuff fails.
* kill ES/clean workspace in setup, so things always work even in the case of ^C
* use pidfile to kill
* fail if kill errors
* refactor a bit more logic here
2015-07-07 20:11:50 -04:00
Ryan Ernst 6eacbf764d Merge pull request #12106 from rjernst/tests/jar-hell
Tests: Add unit tests for JarHell
2015-07-07 16:58:31 -07:00
Ryan Ernst 35b76ca081 Tests: Add unit tests for JarHell 2015-07-07 16:54:03 -07:00
Robert Muir 0d8faabdf1 Merge pull request #12104 from rmuir/harden_integration_tests
Integ setup should unzip org.elasticsearch:elasticsearch:zip
2015-07-07 19:15:38 -04:00
Robert Muir 5884628049 Integ setup should unzip org.elasticsearch:elasticsearch:zip
This property is set by maven, and unlike the current hack, during
a multimodule build will be set to the correct thing.

Otherwise today sometimes we run integ tests with outdated ES
artifacts, which makes for incredibly confusing failures.

Closes #12101
2015-07-07 19:04:46 -04:00