11 Commits

Author SHA1 Message Date
Lee Hinman
db431b7cb3 Remove the field and text queries.
The `text` query was replaced by the `match` query and has been
deprecated for quite a while.

The `field` query should be replaced by a `query_string` query with
the `default_field` specified.

Fixes #4033
2013-12-16 08:59:36 -07:00
Simon Willnauer
fb7a234040 s/AbstractIntegrationTest/ElasticsearchIntegrationTest 2013-11-08 23:56:44 +01:00
Simon Willnauer
5f1efba28c s/ElasticSearch/Elasticsearch in src/test 2013-10-13 22:37:40 +02:00
Martijn van Groningen
1f117c194c Support the has_child, has_parent, top_children queries (and filters) in other apis than just search api. The queries are also now supported in count, explain (return dummy explination) and delete by query apis.
Migrate SearchContext.Rewrite to Releasable. All the parent child queries are now implemented as Lucene queries and the state is kept in the Weight.
Completely disable caching for `has_child` and `has_parent` filters, this has never worked and it also can also never work. The matching docIds are cached per segment while the collection of parent ids is top level.

Closes #3822
2013-10-09 10:20:23 +02:00
Andrew Raines
16cde6f10a Remove redundant wipeIndices(). 2013-09-23 15:03:06 -05:00
Andrew Raines
953bbe4291 More AbstractIntegrationTest 2013-09-21 00:10:16 -05:00
Luca Cavanna
0d3895533c Set nowInMillis to search context created by the validate query api so that "NOW" can be used within queries
Added nowInMillis to ShardValidateQueryRequest in a backwards compatible manner

Fixes #3629
2013-09-20 21:32:13 +02:00
Simon Willnauer
30d7faeba2 Cut over more tests to AbstractIntegrationTest 2013-09-20 13:31:46 +02:00
Simon Willnauer
575d6b0321 Cleanup test classes and add Scope support for TestCluster
TestCluster can currently only be used in a globally shared scope.
This commit adds the ability to use the TestCluster in 3 different
scopes per test-suite. The scopes are 'Global', 'Suite' and 'Test'
where the cluster is shared across all tests, across all test methods or
not at all respectivly.
Subclasses of AbstractIntegrationTest (formerly AbstractSharedClusterTest)
can add an annotation if they need a different scope than Global (default):

```
  @ClusterScope(scope=Scope.Suite, numNodes=1)
```
This also allows to specify the number of shared nodes in that TestCluster
that are available when a test starts.

The cleanups in this commit include:

 - s/Elasticsearch/ElasticSearch/g on test classes
 - Move test classes in org.elasticsearch.test
2013-09-19 17:48:22 +02:00
Simon Willnauer
cabbf7805b Make TestCluster based integration tests more repoducible
While testing an async system providing reproducible tests that
use randomized components is a hard task we should at least try to
reestablish the enviroment of a failing test as much as possible.
This commit allows to re-establish the shared 'TestCluster' by
resetting the cluster to a predefined shared state before each test.

Before this commit a tests that is executed in isolation was likely
using a entirely different node enviroment as the failing test since
the 'TestCluster' kept intermediate nodes started by other tests around.
2013-09-17 23:07:29 +02:00
Andrew Raines
7425b85b0b Collapse test.{unit,integration} into org.elasticsearch. 2013-09-11 12:49:49 -05:00