Lucene 4.4 introduced the tokenStream(String fieldName, String text) helper
method which nicely reuses the string reader. Whenever analyzing Strings, we
should use this method instead of using the Reader method with a
(Fast)StringReader.
Closes#3409
The following changes improved alias creation:
* Moved away from ImmutableMap to JCF's UnmodifiableMap. The ImmutableMap always made a copy, whereas the UnmodifiableMap just wraps the target map.
* Reducing the number of maps being created during the creation of MetaData and IndexMetadata.
* Changed IndexAliasesService's aliases from a copy on write ImmutableMap to ConcurrentMap.
Closes#3410
If it's acknowledged all the other nodes already hold the latest cluster state, thus we can search on the closed index and be sure we get an error back
The open/close index api now waits for an acknowledgement from all the other nodes before returning its response, till the timeout (configurable, default 10 secs) expires. The returned acknowledged flag reflects whether the cluster state change was acknowledged by all the nodes or the timeout expired before.
Closes#3400
- remove Digest/Hex, only used in test, directly use MD5 there
- don't use Closeables and use IOUtils
- remove duplicate Classes usage and unused LongsLAB
when starting the request/response cycle, we should use the lowest version out of the current node version, and the target node version to serialize the request, and put it in the header. this will allow to support both backward and forward comp.
in addition, have Version as an injected value to different services, to make different versions more easily testable, compared to using Version#CURRENT
The percolate an existing document feature executes an internal get operation to get the source of the document to percolate.
All options for percolating an existing document:
* `id` - The id of the document to percolate.
* `type` - The type of the document to percolate.
* `index` - The index to fetch the document to percolate from.
* `routing` - The routing value to use to retrieve the document to percolate.
* `preference` - Which shard to prefer (defaults to `_local`).
* `version` - Enables a version check. If the fetched document's version isn't equal to the specified version then the request fails with a version conflict and the percolation request is aborted.
All the option can be specified inside the `get` body part or via query string arguments.
Internally the percolate api will issue a get request for fetching the`_source` of the document to percolate.
For this feature to work the `_source` for documents to percolate need to be stored.
Closes#3380
Default value is "total", possible values are: "max", "min", "avg",
"multiply" and "total".
- "total": the final score of a document is the sum of the original
query score with the rescore query score.
- "max": only the highest score count.
- "min": only the lowest score is kept (if the document doesn't match
the rescore query, the original query score is used).
- "avg": average of both scores
- "multiply": product of both scores
Closes#3258
Lucene might internally tie-break on low level doc-Ids which
can change depending on merges etc. and test timings. No test should
rely on the actual order if scores are identical.