4053 Commits

Author SHA1 Message Date
Aaron Dixon
bd9a5bfa0c fixed issue2371 (incorrect behavior of path_match) 2012-11-01 22:11:33 +01:00
Chris Male
768b8b4d2b Changed SpatialRelation contains to within 2012-11-01 22:03:47 +01:00
Igor Motov
23f7b0002a Deleting a non-existent warmer shouldn't cause request to hang
Fixes #2363
2012-11-01 21:49:54 +01:00
Igor Motov
a2628b5eb2 Upsert should return fields Fixes #2362 2012-11-01 21:43:23 +01:00
Igor Motov
29928a9e15 Add test for percolation with the _size field enabled 2012-10-23 23:08:52 +02:00
Igor Motov
c551f93cae Add highlighter type switch 2012-10-23 02:25:55 +02:00
Shay Banon
04eabbd38a Mapping: string mapping to automatically set omit_norms to true and index_options to docs when setting index to not_analyzed
closes #2349
2012-10-22 19:01:01 +02:00
Martijn van Groningen
ee5df74a6b Fixed delete by query issue with index aliases and nested mappings.
The issue was that under these circumstances the delete by query operation would run forever.
What also is fixed is that during shard recovery when delete by query is replayed nested docs
are also deleted. Closes #2302
2012-10-20 23:39:15 +02:00
Shay Banon
246dc1d992 formatting 2012-10-19 09:48:48 +02:00
Simon Willnauer
b6a83fd8b2 #2332 support CustomScoreQuery highlighting and expose QueryBuilder on CustomScoreQuery via Java API 2012-10-19 09:23:16 +02:00
Martijn van Groningen
51e69e1a9e Fixed NPE when using has_parent or has_child filter/query.
The NPE occurred when for an arbitrary segment no parent documents exist for a has_parent filter/query and no child documents exist for a has_child filter/query.

Closes #2297
2012-09-28 17:08:30 +02:00
Shay Banon
613c70c289 introduce TransportResponse
a class that needs to be used when sending a response over the transport layer, with an option to have headers
2012-09-27 18:05:16 +02:00
Shay Banon
cfe7504d1c introduce TransportRequest (with optional headers)
introduce a new class, TransportRequest, which includes headers. This class can be used when sending requests over the transport layer, and ActionRequest also extends it now.
This is the first phase of the refactoring part in the transport layer and action layer to allow for simpler implementations of those as well as simpler "filtering" capabilities in the future
2012-09-26 23:46:28 +02:00
Martijn van Groningen
81a6940ad3 Fixed score explain is for custom_filters_score query.
Only the explain of the filter was included. This fix adds an explain for the inner query and wraps it in a top-level explanation.
2012-09-24 14:00:34 +02:00
Shay Banon
6e66f45f58 minor geo shape fetch improvements 2012-09-23 21:31:13 +02:00
Chris Male
05e0b4d4e0 Added ShapeFetchService with support in GeoShapeQueryParser/FilterParser 2012-09-23 21:24:13 +02:00
Chris Male
4f5e62e988 Added MultiPolygon parsing and serialization support 2012-09-21 14:03:21 +02:00
Martijn van Groningen
8080fdc509 Added types exists api
The types exists api checks whether one or more types exists in one or more indices.

## Example usage
curl -XHEAD 'localhost:9200/twitter/tweet'

## Options
* `index` - One or more indices. Either specified as query string parameter or in the uri path.
* `type` - One or more types. Either specified as query string parameter or in the uri path.
* `ignore_missing` -  Determines what type of indices to exclude from a request. The option can have the following values: `none` or `missing`.

Closes #2273
2012-09-21 10:21:32 +02:00
Chris Male
6fc0b83e07 Upgraded to Spatial4j 0.3 2012-09-20 23:55:51 +02:00
Shay Banon
0fadbf2177 more easily add a field with boost to multi match builder 2012-09-20 12:38:13 +02:00
Shay Banon
83a39bd509 improve test by not waiting for green state, no need 2012-09-20 12:00:58 +02:00
Shay Banon
f8e1291243 global node indices level queries to be created by guice 2012-09-20 11:54:46 +02:00
Martijn van Groningen
d5aa35e0ea Added better error handling for has_child, has_parent and top_children.
If has_parent, has_child or top_children are executed incorrectly then a better exception is thrown. This gives a better error description when one of these queries or filters is being used in count api.

Closes #2261
2012-09-18 13:26:23 +02:00
Shay Banon
7924115b90 Disable allocation: New indices allocation not to be disabled by default
When setting cluster.routing.allocation.disable_allocation, it causes new indices primary shards to not be allocated. By default, new indices created should allow to, at the very least, allocate primary shards so they become operations. A new setting, cluster.routing.allocation.disable_new_allocation, allows to also disable "new" allocations.
closes #2258.
2012-09-17 16:00:55 +02:00
Shay Banon
90e0a70e0e cancel allocation command to allow_primary to be cancelled 2012-09-17 12:31:33 +02:00
Shay Banon
afca5ef15f The reroute command allows to explcitiyly execute a cluster reroute allocation command including specific commands. For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, or an unassigned shard can be explicitly allocated on a specific node.
Here is a short example of how a simple reroute API call:

    curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
        "commands" : [
            {"move" : {"index" : "test", "shard" : 0, "from_node" : "node1", "to_node" : "node2"}},
            {"allocate" : {"index" : "test", "shard" : 1, "node" : "node3"}}
        ]
    }'

An importnat aspect to remember is the fact that once when an allocation occurs, the cluster will aim at rebalancing its state back to an even state. For example, if the allocation includes moving a shard from `node1` to `node2`, in an "even" state, then another shard will be moved from `node2` to `node1` to even things out.

The cluster can be set to disable allocations, which means that only the explicitl allocations will be performed. Obviously, only once all commands has been applied, the cluster will aim to be rebalance its state.

Anohter option is to run the commands in "dry_run" (as a URI flag, or in the request body). This will cause the commands to apply to the current cluster state, and reutrn the resulting cluster after the comamnds (and rebalancing) has been applied.

The commands supporterd are:

* `move`: Move a started shard from one node to anotehr node. Accepts `index` and `shard` for index name and shard number, `from_node` for the node to move the shard "from", and `to_node` for the node to move the shard to.
* `cancel`: Cancel allocation of a shard (or recovery). Accepts `index` and `shard` for index name and shar number, and `node` for the node to cancel the shard allocation on.
* `allocate`: Allocate an unassigned shard to a node. Accepts the `index` and `shard` for index name and shard number, and `node` to allocate the shard to. It also accepts `allow_primary` flag to explciitly specify that it is allowed to explciitly allocate a primary shard (might result in data loss).

closes #2256
2012-09-15 22:56:14 +02:00
Martijn van Groningen
cfe76546f2 Added has_parent query The has_parent query works the same as the has_parent filter, by automatically wrapping the filter with a constant_score. It has the same syntax as the has_parent filter. Closes #2254 2012-09-14 17:34:01 +02:00
Martijn van Groningen
3cd54fc4ee Improve has_child filter / query performance (#2251) Added a new has_child filter implementation, that works _uid based instead of bitset based. This implementation is about ~2 till ~6 times (depending on the query) faster than the already existing bitset based implementation. 2012-09-14 14:37:29 +02:00
Shay Banon
ef9974ce2c add serialization options for allocation commands 2012-09-14 14:26:39 +02:00
Martijn van Groningen
2bd9b3aed0 Added has_parent filter (#2243)
The `has_parent` filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest `has_parent` filter has the same options and works in the same manner as the `has_child` filter.

This is an experimental filter.

Filter example
###################
```
{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}
```
The `parent_type` field name can also be abbreviated to `type`.

Memory considerations
###############
With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue #792
2012-09-13 13:35:45 +02:00
Shay Banon
e530f03b94 internal custom allocation commands
add support for internal custom allocation commands, including allocation, move, and cancel (shard).
also, fix #2242, which causes the cluster state to be in inconsistent state when a shard being the source of relocation is failed
2012-09-12 15:13:27 +02:00
Martijn van Groningen
b6a9bd9a31 - Fixed boosting per field with multi_match query. 2012-09-12 11:43:33 +02:00
Shay Banon
24ce2ef537 handle EOF when handling arrays as well 2012-09-05 11:40:39 +02:00
Shay Banon
a42159f8d5 Shard Allocation: index.routing.allocation.... settings do not "remove" the setting on empty string, closes #2229. 2012-09-03 16:44:23 +02:00
Martijn van Groningen
9b29950997 Added fields option to explain api. #2203 2012-08-31 22:19:09 +02:00
Martijn van Groningen
cd0e1226e1 Added a global ignore_malformed index setting. #2220 Also extended the ignore_malformed support to TTL, Ip and timestamp field types. 2012-08-31 22:10:46 +02:00
Martijn van Groningen
dea2de3304 Add ignore_indices option for search, multisearch, count and other Broadcast request. #2209 2012-08-27 15:36:14 +03:00
Martijn van Groningen
1d4aee6086 - Explain api opens 2 engine searchers, but closes only 1 engine searcher. Closes #2206 2012-08-27 12:20:02 +03:00
Martijn van Groningen
bbe735f2cc Fixed issue #2197 2012-08-25 00:38:26 +03:00
uboness
b4b33bb205 Local node master listener
* Fixed an issue where dynamic update to minimum_master_nodes settings would not take immediate effect
* Added LocalNodeMasterListener support to the ClusterService. Enables listening to when the local node becomes/stopped being a master
2012-08-24 02:25:13 +02:00
uboness
3fdb9f0a27 Enabled the option of configuring plugin types in the settings. This will also help in tests when testing plugin related functionality 2012-08-21 23:00:24 +02:00
Martijn van Groningen
8365e7ba0b - Added explain api. #2184 2012-08-21 13:26:17 +02:00
Shay Banon
9aae62b4a6 All Field: Automatically detect when field level boosting is used, and optimize when its not, closes #2189. 2012-08-20 15:07:32 +02:00
Shay Banon
e3a9271000 unify more count and search implementation 2012-08-19 16:54:53 +02:00
Simon Willnauer
b0b5775c98 use term query instead of a specialized SpanTermQuery on _all field if positions are omitted 2012-08-16 10:42:14 -07:00
Shay Banon
ab49a8c2fc improve update test to wait for green cluster state 2012-08-14 01:47:18 +02:00
Simon Willnauer
53f65d8ff2 Remove / deprecated omit_term_freq_and_positions in favor of IndexOptions exposed via mapping API 2012-08-13 17:19:08 +02:00
Shay Banon
eda3da2aea fix geo shape tests 2012-08-13 14:40:36 +02:00
Chris Male
bea4346f3a Added GeoShape indexing and querying support 2012-08-13 13:44:29 +02:00
Martijn van Groningen
b979dfa0be Add lenient option to match & multi_match queries. #2156 2012-08-09 21:56:50 +02:00