Commit Graph

2903 Commits

Author SHA1 Message Date
Adrien Grand 5968680b41 Fix test bug: we need at least one parent to have 1 child or more. 2013-11-28 09:40:52 +01:00
Simon Willnauer 71eb4532f8 Catch AlreadClosedException in RobinSearcher#release()
When we relocate a shard we might still have pending SearchContext
instances hanging around that will be used in "in-flight" searches
on the already relocated shard. This is a valid operation but if
we have already closed the underlying directory which happens during
cleanup concurrently the close call on the IndexReader can trigger
an AlreadyClosedException when the NRT reader tries to cleanup files
via the IndexWriter.

Closes #4273
2013-11-27 15:55:30 +01:00
Simon Willnauer ba3269dedc Fix assertions in testEquivalence and beef up the test 2013-11-27 15:21:09 +01:00
Adrien Grand 596d511466 Cleanup of IndexFieldDataService.getForField.
This method has 2 signatures and one of them is dangerous since it allows to
discard fielddata configuration of the field mapper. This commit changes the
percolator so that it uses fielddata configuration of the _id field mapper
instead of forcing the paged_bytes format.

Closes #4270
2013-11-27 14:56:09 +01:00
uboness fda6ca4869 Added support for shard_size in terms agg
Closes #4242
2013-11-27 14:16:58 +01:00
Simon Willnauer d18ce2733d Cleanup Rescorer Tests & add random indexing 2013-11-27 11:55:29 +01:00
Alexander Reelsen 4774439436 Fixed file-based template loading via config/templates
When parsing the json file, the first field is ignored as
parser.nextToken() seems to be called too often.

Closes #4235
2013-11-27 09:49:15 +01:00
Simon Willnauer e66c2793aa Add hole character to the reverved characters for completion suggester 2013-11-26 22:46:43 +01:00
Shay Banon f40959cc30 Cat API: Add h parameter to apis, allowing to return columns and descriptions for them
closes #4262
2013-11-26 22:14:18 +01:00
Alexander Reelsen 2a456e5716 Fixing CompletionFieldMapper.isReservedChar() to take all relevant chars in account 2013-11-26 20:42:37 +01:00
Martijn van Groningen 3c4fc119ab Only print the warning about '.' in type, when it is not a percolator type. 2013-11-26 19:01:43 +01:00
Martijn van Groningen dafb90e62a Include facets in the rest response. 2013-11-26 18:59:21 +01:00
Britta Weber 1510cd6923 Fix issue 3989
Multi term vector request never returned if shards for all requested documents
were non existent.

closes #3989
2013-11-26 17:04:18 +01:00
Britta Weber 3be5f3345e Make parsing of uri and body parameters consistent with single term vector api
uri parameters were not all parsed for the multi term vector request. This commit
makes sure that all parameters are parsed and used when creating the requests for the
multi term vector request.

In order to simplify both code and json request, the request structure now allows
two ways to use multi term vectors:

1. Give all parameters for each document requested in the docs array like this:

```
{
   "docs": [
      {
         "_index": "testidx",
         "_type": "test",
         "_id": "2",
         "terms": [
            "fox"
         ],
         "term_statistics": true
      },
      {
         "_index": "testidx",
         "_type": "test",
         "_id": "1",
         "terms": [
            "quick",
            "brown"
         ],
         "term_statistics": false
      }
   ]
}
```

2. Define a list of ids and give parameters in a separate parameters object like this:

```
{
   "ids": [
      "1",
      "2"
   ],
   "parameters": {
      "_index": "testidx",
      "_type": "test",
      "terms": [
         "brown"
      ]
   }
}
```

uri parameters are global parameters that are set for both cases. They are overwritten
by parameter definitions in the body.

Also, this commit adds the missing setParent(..) and setPreference(..) to TermVectorRequestBuilder.
2013-11-26 17:02:56 +01:00
Alexander Reelsen 6e1a04b370 Added unit test for current completion postingsformat 2013-11-26 12:52:07 +01:00
Alexander Reelsen 4e836a3459 Randomized CompletionSuggestSearchTests 2013-11-26 12:52:07 +01:00
Alexander Reelsen bf74f49fdd Updated Analyzing/Fuzzysuggester from lucene trunk
* Minor alignments (like setter to ctor)
* FuzzySuggester has a unicode aware flag, which is not exposed in the fuzzy completion request parameters
* Made XAnalyzingSuggester flags (PAYLOAD_SEP, END_BYTE, SEP_LABEL) to be written into the postings format, so we can retain backwards compatibility
* The above change also implies, that these flags can be set per instantiated XAnalyzingSuggester
* CompletionPostingsFormatTest now uses a randomProvider for writing data to check for bwc
2013-11-26 12:52:06 +01:00
Martijn van Groningen 9f5d01ca4c Cut DiscoveryNodes over to ImmutableOpenMap. 2013-11-26 11:57:15 +01:00
Simon Willnauer cf3ba7c51c Only use -Dtests.jvm.argline instead of numbered options 2013-11-26 11:11:19 +01:00
Simon Willnauer 9b839ca79f Add more reporting to asserting index searcher 2013-11-26 10:54:37 +01:00
Shay Banon 6f90a3e39a allow to parse directly the compressed mapping 2013-11-26 09:48:33 +01:00
Shay Banon 0610fc3ad2 use the proper abstraction of ImmutableOpenMap
we already use the open map / clone trick, might as well use the ImmutableOpenMap here
2013-11-26 02:48:31 +01:00
Martijn van Groningen a03556daa0 Added execution option to `range` filter, with the `index` and `fielddata` as values.
Deprecated `numeric_range` filter in favor for the `range` filter with `fielddata` as execution.

Closes #4034
2013-11-25 23:43:40 +01:00
Martijn van Groningen ac03fba9d3 Small cleanup 2013-11-25 23:18:36 +01:00
Martijn van Groningen 036febe110 Cut the following classes over to ImmutableOpenMap:
* MetaData
* IndexMetaData
* ClusterState
* IndexTemplateMetaData
2013-11-25 21:59:06 +01:00
Simon Willnauer 46ab6a1533 Include JVM Arg line in reproduce line 2013-11-25 14:35:34 +01:00
Shay Banon 32d073bbf8 Bulk should support shard timeout like the index api
closes #4220
2013-11-25 11:48:22 +01:00
Shay Banon 2ba7c1d4a1 acquireSearcher should fail with state failure when not set/closed
also fixes #4232
2013-11-25 11:24:55 +01:00
Shay Banon 9648a53fd5 acquireSearcher should fail with state failure when not set/closed
also fixes #4232
2013-11-25 11:24:19 +01:00
Martijn van Groningen efba3a50dd iterator doesn't implement #remove() 2013-11-25 10:32:35 +01:00
Igor Motov e3d4d73242 Local primaries should be preferred to relocating primaries
To reproduce the bug use -Dtests.seed=5AB62524C9AB0489
Fixes #4237
2013-11-24 21:20:01 -05:00
Simon Willnauer 8e17d636ef Upgrade to Lucene 4.6
This commit upgrades to Lucene 4.6 and contains the following improvements:

 * Remove XIndexWriter in favor of the fixed IndexWriter
 * Removes patched XLuceneConstantScoreQuery
 * Now uses Lucene passage formatters contributed from Elasticsearch in PostingsHighlighter
 * Upgrades to Lucene46 Codec from Lucene45 Codec
 * Fixes problem in CommonTermsQueryParser where close was never called.

Closes #4241
2013-11-24 21:08:38 +01:00
uboness 28adbd475d added a waitForGreen condition for the unmapped tests on missing agg 2013-11-24 20:26:12 +01:00
Martijn van Groningen 8fda8aaabf force default codec
reduce p/c searches and num child docs being generated
2013-11-24 15:35:11 +01:00
uboness c7f6c5266d initial commit of the aggregations module
Closes #3300
2013-11-24 03:13:08 -08:00
Simon Willnauer 34d567a133 Don't use mock wrapper on relocate stress test for now since it could be the reason for intermediate/occational failures 2013-11-23 09:22:16 +01:00
Alexander Reelsen fdc4f72e8a Added mlockall setting to process info output 2013-11-23 07:40:59 +01:00
Martijn van Groningen 688a6bd29b Added random test for ParentQuery and ChildrenQuery. 2013-11-22 18:38:46 +01:00
Martijn van Groningen c46fe4a0e8 Introduced EA#assertMatchCount() and make test used that. 2013-11-22 13:47:02 +01:00
Boaz Leskes 5e58c1b9e1 Added a bulk indexing while initializing test.
Relates to #4214
2013-11-22 13:23:42 +01:00
Igor Motov 4ffd8a663c Fix possible NPE in snapshot service if a shard doesn't have primary 2013-11-21 20:08:57 -05:00
Igor Motov 1d0bae0f50 Prevent modification or deletion of repositories while snapshots are running 2013-11-21 20:08:57 -05:00
Igor Motov 2f66bf0720 Fix typo in MockRamDirectoryService name 2013-11-21 20:08:57 -05:00
Luca Cavanna 22852d8040 AckTests: more assertAcked and added common method to retrieve local cluster state 2013-11-21 22:59:48 +01:00
Martijn van Groningen efbe1e84b9 Added random test for ParentConstantScoreQuery 2013-11-21 19:19:04 +01:00
Martijn van Groningen c5aee7200f removed the static field in ChildrenConstantScoreQueryTests 2013-11-21 18:29:41 +01:00
Martijn van Groningen 3f02392376 unset static field after test suite has been completed. 2013-11-21 16:01:03 +01:00
Martijn van Groningen 9e25c6a4db Added random test for ChildrenConstantScoreQuery. 2013-11-21 14:24:53 +01:00
Simon Willnauer 8d1e526616 By default don't fail on close sicne pending open files are common in ES
We have pending open files on a regular basis since we search while
relocating etc. and keep search contexts around that are cleaned up
later. We should rather let the close call pass on even if files are
open and only force failures on teardown in ElasticsearchIntegrationTest
2013-11-21 11:51:54 +01:00
Shay Banon f465a6b589 field level field data cache should take into account a null listener
also, cleanup the onRemoval code
2013-11-20 09:31:19 -08:00
Martijn van Groningen 1608ccc373 Use #assertAcked() for verification. 2013-11-20 12:56:08 +01:00
Alexander Reelsen 8257370415 Refactoring IndicesAnalysisService
Using enums where possible in order to clean up the code in IndicesAnalysisService

Also introduced a simpler generic caching mechanism, and tests.
2013-11-20 12:11:07 +01:00
Luca Cavanna adb83182a5 Added readTimeout, writeTimeout, readAcknowledged and writeAcknowledged methods variation without version as parameter, to be used by api that always read and write those parameters. Helps avoiding to call the variation that accepts a Version with actual version null. 2013-11-20 10:40:25 +01:00
Luca Cavanna ec3d858cc2 Added base ClusterStateUpdateRequest class that executes on multiple indices 2013-11-20 10:40:25 +01:00
Luca Cavanna 39c606c59a Refactored open/close index api to make use of the new recently introduced generic ack mechanism
Closes #4169
2013-11-20 10:40:25 +01:00
Luca Cavanna 8377f05408 Removed redundant masterNodeTimeout, already present in the ClusterStateUpdateRequest base class 2013-11-20 10:15:43 +01:00
David Pilato 260531bbb2 NPE in PluginsService when starting elasticsearch with a wrong user
When starting elasticsearch with a wrong linux user, it could generate a `NullPointerException` when `PluginsService` tries to list available plugins in `./plugins` dir.

To reproduce:

* create a plugins directory with `rwx` rights for root user only
* launch elasticsearch from another account (elasticsearch for example)

Related discussion: https://groups.google.com/forum/#!topic/elasticsearch/_WRW4Qfpo7M

Closes #4186.
Closes #4187.
2013-11-20 09:58:20 +01:00
Shay Banon bc54201cfc Running the node stats api while a shard is moving onto the node logs an exception
fixes #4203
2013-11-19 11:54:32 -08:00
Matt Weber a841a422f6 Add a field data based TermsFilter
Add FieldDataTermsFilter that compares terms out of
the fielddata cache. When filtering on a large
set of terms this filter can be considerably faster
than using a standard lucene terms filter.

Add the "fielddata" execution mode to the
terms filter parser to enable the use of
the new FieldDataTermsFilter.

Add supporting tests and documentation.

Closes #4209
2013-11-19 19:18:16 +01:00
Alexander Reelsen dab841d4ec Revert Ignore slow log configuration on shard creation
This reverts commit 10810f00d4 as this introduces an exception to the rule when parsing settings.
2013-11-19 16:11:59 +01:00
Alexander Reelsen 10810f00d4 Ignore slow log configuration on shard creation
In case of a misconfigured slow search/index configuration (unparseable
TimeValue) an exception is thrown.

This is not a problem when creating a shard of an index, as an exception
is returned and all is good. However, this is a huge problem, when
starting up a node, as the shard creation is repeated endlessly.

This patch changes the behaviour to go on as usual and just disable the
slowlog, as an improper configuration of logging should not affect the
allocation behaviour.

Closes #2730
2013-11-19 15:35:50 +01:00
Alexander Reelsen 88b854e2ea Making SearchRequest in PutWarmerRequest mandatory & validated
The search request inside of a put warmer request was nullable, but actually we have to have that request in the transport action.
Validation and appropriate test added.

Closes #4196
2013-11-19 15:02:08 +01:00
Alexander Reelsen 513611bd48 DateFieldMapper.merge() can change date format and include_in_all
In order to be able to add an additional date to a date field mapper,
the merge operation has to support this.

Closes #3727
2013-11-19 14:33:41 +01:00
Martijn van Groningen 244e78fbfb Fixed small test bug. 2013-11-19 11:26:45 +01:00
Lee Hinman c96cb99cef Move ?pretty=false handling to the builder instead of mutating the map 2013-11-18 16:03:36 -07:00
Matt Weber 9c15b86b89 Update FilterBuilder and QueryBuilder interfaces
Make the FilterBuilder interface consistent with the QueryBuilder
interface and replace usage of QueryBuilderException with
ElasticSearchIllegalArgumentException.
2013-11-18 20:22:54 +01:00
Benjamin Devèze 00be285c26 Handle pretty=false and missing line feed for pretty=true which is the default for main REST action 2013-11-18 07:39:15 -07:00
Martijn van Groningen 59f1ce5ada Added test for PR #4157 (deep pagination in a small index) 2013-11-18 12:58:55 +01:00
Mark Elliot 5e164a85ed Size docIdsToLoad appropriately in SearchService
Closes #4156
2013-11-18 12:40:13 +01:00
Alexander Reelsen 5e835f0071 Added test for Update API via native scripts
Motivation was to have a test ready as well as something other people could have a look at.
2013-11-18 11:42:29 +01:00
Luca Cavanna 38d895bf1a Added catch EsRejectedExecutionException when trying to reschedule river start 2013-11-18 10:40:09 +01:00
Simon Willnauer 5b1820b723 Don't take static memory of test base classes into account when checking for static leftovers. 2013-11-18 10:26:08 +01:00
Matt Weber 55300f3a3f Update BloomFilter
Allow the user to configure the number of hash functions as well as add
support for serializing/deserializing the bloom filter from a stream.
Add a hashCode to the bloom filter.
2013-11-18 09:46:04 +01:00
Igor Motov 2c1714d4b2 Re-enable snapshot/restore tests that were failing on windows 2013-11-15 13:05:46 -05:00
Britta Weber faf2380605 Allow native scripts to set the value of a script field to primitive arrays
Script fields could not be set to int[] and float[] by native
scripts because StreamInput and StreamOutput could not handle
them.

closes #4175
2013-11-15 18:58:12 +01:00
Andrew Raines c65dcd6dc8 Add load average to _cat/nodes. 2013-11-14 20:13:57 -05:00
Andrew Raines 7a348cd2d8 Add _cat/help (halp!) 2013-11-14 20:13:55 -05:00
Andrew Raines 72d052f753 Add full_id param to support displaying entire node ID. 2013-11-14 20:10:41 -05:00
Andrew Raines 2b8bf07bd3 Drop the heap and RAM used from _cat/nodes and add the RAM percentage.
In this view you never care about the actual heap used bytes; you only
want to know that your max is set to what you meant and what
percentage you're currently using.

Closes #4151.
2013-11-14 20:10:40 -05:00
Andrew Raines 5c085c1204 Fix misspellings. 2013-11-14 20:10:36 -05:00
Igor Motov c63701c5c7 Improve snapshot/restore test speed 2013-11-14 19:05:13 -05:00
Luca Cavanna b2ad34cf99 Refactored indices aliases api to make use of the new recently introduced generic ack mechanism
Closes #4114
2013-11-14 22:59:17 +01:00
Shay Banon 3b30192c8f fix failed compilation under jdk 6 2013-11-14 22:48:11 +01:00
Igor Motov 499cff3b1e Fix possible NPE in snapshot/restore during node shutdown 2013-11-14 13:22:55 -05:00
Luca Cavanna 6945f294e7 Added support for _name parameter in indices filter
Closes #4166
2013-11-14 18:43:08 +01:00
Luca Cavanna 4670a2e514 Trimmed down MatchedQueriesTests 2013-11-14 18:37:55 +01:00
Luca Cavanna 0aaa39d00a Minor improvements to indices filter and query & updated docs
Slightly simplified indices filter and query parsers code
Trimmed down tests where possible
2013-11-14 17:25:34 +01:00
Olivier Favre fa80ca97b2 Indices query/filter skip parsing altogether for irrelevant indices when possible
Closes #2416
2013-11-14 17:24:49 +01:00
Alexander Reelsen c8020760d7 multi_match query supports fields as single string and array
The multi_match query accepted only an array in the fields parameter. This patch allows to use a single string as well.

Also added tests for parsing in both cases.

Closes #4164
2013-11-14 15:54:03 +01:00
Shay Banon 826b8bd742 move bloom filter class to a more common package 2013-11-14 15:37:01 +01:00
Shay Banon f8afa4d67b remove deprecated method usage with jackson 2013-11-14 13:15:26 +01:00
Igor Motov 3c0cc22d36 Fix possible race condition during snapshot deletion 2013-11-13 23:21:17 -05:00
Igor Motov 0a7c6c9288 Fix file handle leak in URLBlobContainer 2013-11-13 23:21:16 -05:00
Boaz Leskes c324251fc2 Make SimpleNodeSampler populate the list of connected nodes using the information returned from the cluster
This is to allow people to introspect things like data settings and attributes. Also makes it consistent with the sniff sampler.

Closes #4162
2013-11-13 17:26:24 +01:00
Simon Willnauer ba61bbb31b Move [0.90.7] to a release 2013-11-13 15:53:57 +01:00
Martijn van Groningen 8e0291823a Fixed bug in bool filter where it doesn't emit docs as hits while they are hits.
There is an optimization that executes bit based (slow) filters in the end. Matched docs could be unset if they didn't match with any of these filters. The bug was that also iterator based (fast) filters should be checked.
This change checks all should filters in the end part (if must or must_not clauses exists), so it can now correctly unset matched docs. The current bool filters requires that at least one should clause must match for docs to be match regardless of any other clauses.

Closes #4130
2013-11-13 11:54:48 +01:00
Igor Motov c3e53f3889 Make mock repository blocking tests more deterministic and reproducible 2013-11-12 13:34:14 -05:00
Simon Willnauer 904c0abb3e Add random filter that compares XBooleanFilter with BooleanQuery while respective the min_should_match = 1 that the filter applies 2013-11-12 18:30:46 +01:00
Simon Willnauer 1e06c76467 Release semaphore if client call throws and exception
Closes #4153
2013-11-12 15:05:42 +01:00
Simon Willnauer 16ee742682 Cleanup test framework in order to release it as a jar file
This commit adds javadocs and removed unused methods from central
classes like ElasticsearchIntegrationTest. It also changes visibility
of many methods and classes that are only needed inside the test infrastructure.
2013-11-12 11:54:55 +01:00
Antoine Rey 2afdb4c8e7 [Javadoc] Fix copy/paste comment on YAML type 2013-11-12 10:19:41 +01:00
Igor Motov f9b43a9efa Failure in onComplete method of AbstractFsBlobContainer#readBlob should trigger onFailure 2013-11-11 20:57:50 -05:00
Igor Motov ab52ab48dd Randomize the number of snapshots in deleteSnapshotTest 2013-11-11 14:42:43 -05:00
Igor Motov e32f16b789 Fix file handle leak in readBlob method of AbstractFsBlobContainer 2013-11-11 14:41:53 -05:00
Igor Motov 2b57770543 Disable snapshot/restore tests that fail on windows with AwaitsFix while working on the fix 2013-11-11 10:05:36 -05:00
Martijn van Groningen 1895ba8271 Fixed NPE if matched parent docs is higher than short_circuit_cutoff.
Closes #4135
2013-11-11 14:40:48 +01:00
Martijn van Groningen 9fdcb0ad05 Upgraded to hppc version 0.5.3 2013-11-11 14:27:52 +01:00
Simon Willnauer a305fb08d6 Wipe snapshot repos after and before tests
On windows tests sometimes fail since files can not be deleted due
to existing repos still holding on to the files. The test
framework is picky about that since it could be a bug and fails
the test if a temp file can not be deleted.
2013-11-11 09:57:45 +01:00
Boaz Leskes 7d9154b8b5 IndexShardGatewayService should not call post_recovery if shard is in STARTED state.
At the end recovery, the IndexShardGatewayService will double check the gateway has moved the shard to POST_RECOVERY and if not, do it it self.
The shard state could have already move to started, causing the post_recovery call to throw an exception and the entire shard recovery to fail.

This can happened if, after the gateway moved the shard to POST_RECOVERY:
1) master sent a new cluster state indicating shard is initializing
2) IndicesClusterStateService#applyInitializingShard will send a shard started event
3) Master will mark shard as started and this will be processed quickly and move the shard to STARTED.

Closes #4147
2013-11-11 08:54:24 +01:00
Igor Motov 510397aecd Initial implementation of Snapshot/Restore API
Closes #3826
2013-11-10 18:26:56 -05:00
Boaz Leskes 81928bd323 fixed a broken trace logging line. 2013-11-10 22:59:19 +01:00
Boaz Leskes 2c5d483be1 Added heap_max(_in_bytes) and heap_used_percent to JVM node stats.
Closes #4145
2013-11-10 21:11:07 +01:00
Luca Cavanna b7cc378aeb Schedule retry if the river type is available but the _meta document isn't
With #3782 we changed the execution order of dynamic mapping updates and index operations. We now first send the mapping update to the master node, and then we index the document. This makes sense but caused issues with rivers as they are started due to the cluster changed event that is triggered on the master node right after the mapping update has been applied, but in order for the river to be started its _meta document needs to be available, which is not the case anymore as the index operation most likely hasn't happened yet. As a result in most of the cases rivers don't get started.
What we want to do is retry a few times if the _meta document wasn't found, so that the river gets started anyway.

Closes #4089, #3840
2013-11-10 21:02:06 +01:00
Igor Motov d390f5250b Add river creation test 2013-11-10 21:02:06 +01:00
Luca Cavanna 60117d3acf Added docs for River start and close methods
Closes #3787
2013-11-10 21:01:01 +01:00
Simon Willnauer 77239a76f8 Lazily fill CharTermAttribute if needed in CompletionTokenStream
This adds a delegate to CharTermAttributeImpl to be compatible
with the Percolator that needs a CharTermAttribute. Yet compared
to CharTermAttributImpl we only fill the BytesRef with UTF-8 since
we already have it and only if we need to convert to UTF-16 we do it.

Closes #4028
2013-11-10 20:43:00 +01:00
Andrew Ochsner 914fd29e70 Change default store impl to mmapfs on 64bit Linux.
Fixes #4134
2013-11-09 11:37:17 -07:00
Shay Banon ffe5e1861f close transport client to wait for ongoing samples
the transport client should not be executing at the same time as sampling happens, so connection open/close logic will be properly maintained
2013-11-09 14:54:50 +01:00
Simon Willnauer fb7a234040 s/AbstractIntegrationTest/ElasticsearchIntegrationTest 2013-11-08 23:56:44 +01:00
Clinton Gormley 7189310764 In ctor of GeoPointFieldMapper, geohash_prefix now implicitly enables geohash option
Also improved docs for geopoint type and geohash_cell filte

Closes #3951
2013-11-08 13:52:17 +01:00
Luca Cavanna 4aa59aff00 Added support for external query in postings highlighter
It is now possible to highlight an external query using the postings highlighter, relates to #3630

Closes #4121
2013-11-08 11:31:42 +01:00
Shay Banon 6f286c3382 Unable to create a nested filtered alias on a dataless master
fixes #4112
2013-11-08 11:22:43 +01:00
Shay Banon 7fc4947271 _default_ mapping not applied when using separate master/data nodes
fixes #4124
2013-11-08 10:55:05 +01:00
Simon Willnauer 76622f1a9b Reduce number of docs in test for #4093 - 30 docs are enough to trigger the bug 2013-11-08 09:59:30 +01:00
Luca Cavanna cdbd7918ee Used the actual index_name when making highlighting using the postings highlighter
Previously the field name specified in the search request was used, which isn't correct in case a custom index_name has been used for a field or the "path":"just_name" has been used in the mapping.

 Closes #4116
2013-11-07 17:19:52 +01:00
Olivier Favre 566ca24247 Fix missing affectation in SimpleChildQuerySearchTests.testParentChildQueriesCanHandleNoRelevantTypesInIndex() 2013-11-07 15:58:41 +01:00
Luca Cavanna 2071fb26c2 Trimmed down HighlighterSearchTests
Used common assertHighlight and concise mapping whenever possible
More indexRandom too
2013-11-07 15:44:33 +01:00
Luca Cavanna 06938e6fb0 Fixed fetch subphase to not recreate the HitContext for each hit, so that the object cache stays the same
Fixed also bug in the fast vector highlighter which was raised by enabling the object cache, due to null FieldQuery (NPE) in case the objects are taken from the cache

Added tests to check if there are issues when highlighting multiple fields at the same time

Closes #4106
2013-11-07 15:44:33 +01:00
Simon Willnauer 91e31e530f Move stresstests out of o.e.test 2013-11-07 14:44:05 +01:00
Simon Willnauer 03c326dafa Move o.e.junit to o.e.test.junit 2013-11-07 14:41:17 +01:00
Simon Willnauer e8f4445cc3 Move MockDirectories into o.e.test.store 2013-11-07 14:39:33 +01:00
Simon Willnauer 8ecdb65d94 Move IndexFieldDataServiceTests into corresponding package 2013-11-07 14:37:01 +01:00
Simon Willnauer a9239f8147 Guarantee sorted order for [Double|Long|Bytes]Values
Values returned by [Double|Long|Bytes]Values are sorted today which
is guaranteed by the underlying Lucene index. Several implementations can
make use of this property but the interfaces don't guarantee this behavior.
This commit adds the guarantees and makes use of them in several places.

Note: This change might require sorting for 3rd party implemenations of these
interaces.
2013-11-07 10:29:23 +01:00
Simon Willnauer f5f6259d03 Reduce number of documents in RobinEngineIntegrationTest to prevent memory peaks triggering OOM 2013-11-07 09:44:53 +01:00
Shay Banon 021aa09614 External method to set rootTypeParsers in DocumentMapperParser incorrect
fixes #4113
2013-11-07 01:06:57 +01:00
Simon Willnauer f6c2ee0ab2 Improve stability of RobinEngineIntegrationTest by reducing direct memory usage of the test env 2013-11-06 22:09:00 +01:00
Shay Banon c95c7096e5 Index Stats: Add support for segments stats
closes #4101
2013-11-06 20:44:01 +01:00
Simon Willnauer e1b6988886 move to [1.0.0.Beta2] SNAP 2013-11-06 16:19:50 +01:00
Simon Willnauer 77bc5d5ecf release [1.0.0.Beta1] 2013-11-06 15:32:43 +01:00
Simon Willnauer bb777a2dfe Apply fix for LUCENE-5330 pruning the IndexWriter queue to get rid of pending event
Closes #4093
2013-11-06 14:00:28 +01:00
Simon Willnauer d4873bd6a5 Use same caching strategy for STANDARD and DEFAULT analyzer 2013-11-06 10:58:40 +01:00
Luca Cavanna 47aa01f5d1 Improved highlight *manyDocs tests (fvh and postings) to have random refreshes, flushes and optimizes using indexRandom 2013-11-06 10:30:32 +01:00
Luca Cavanna a3e355d40e Fixed doc_id used in combination with context.searcher(), needs to be topLevelId rather than just docId
Improved test to catch this problem calling refresh more frequently and having the word to highlight in different positions in the text

Closes #4103
2013-11-06 01:20:27 +01:00
Shay Banon ebc8975efd NPE when closing XContentBuilder and using 'pretty' query parameter
fixes #4100
2013-11-06 01:10:58 +01:00
Igor Motov 03179497a3 Add /_cat endpoint 2013-11-05 15:40:48 -05:00
Simon Willnauer 9654631186 Change 'standart' analyzer to use emtpy stopword list by default.
The 'default' / 'standard' analyzer can be a trappy default sicne it filters
english stopwords by default. Yet a default should not be dedicated to a certain language
since elasticsearch is used in many different scenarios where a standard analysis chain
with specialization to english full-text might be rather counter productive.

This commit changes the 'standard' analyzer to use an empty stopword list for indices
that are created from 1.0.0.Beta1 version onwards but will maintain backwards compatibiliy
for older indices.

Closes #3775
2013-11-05 21:07:21 +01:00
Shay Banon 1586339ee0 better support for single value to settings builder where the type gets lost
relates to #4097
2013-11-05 21:04:27 +01:00
Shay Banon 7c32269f4f Dist. Percolation: Use .percolator instead of _percolator for type name
Use .percolator as the internal (hidden) type name for percolators within the index. Seems nicer name to represent "hidden" types within an index.
closes #4090
2013-11-05 20:02:59 +01:00
Lee Hinman af183a1619 Fix `indices.recovery.concurrent_small_file_streams` not being dynamically settable
Fixes #4094
2013-11-05 10:03:21 -07:00
Boaz Leskes 0ef2493b2c Throw an exception if a type's mapping root node is not equal to the type in question.
Also, fix all the problems it brought up in tests.
Removed OverrideTypeMappingTests as it is no longer relevant.
Better naming for the default percolator mapping and change it's content use _default_ as root node.

Closes #4038
2013-11-05 11:54:25 +01:00