Commit Graph

11189 Commits

Author SHA1 Message Date
Clinton Gormley c046398093 Update indices.asciidoc
Fixed typo in cat indices

Relates to #7936
2015-04-04 16:50:04 +02:00
B1nj0y bb7cbea71e Docs: Update client.asciidoc
change a typo.

Closes #10039
2015-04-04 15:21:11 +02:00
Ryan Ernst c3011cead4 Tests: Revamp static bwc test framework to use dangling indexes
The static old index tests currently take a long time to run because
each index version essentially recreates the cluster, and spins up
new nodes.  This PR instead loads each old version into the existing
cluster as a dangling index. It also removes the intermediate
"StaticIndexBackwardCompatibilityTest" which was an extra layer
with no purpose, and moves a shared version of a commonly found
function to get an http client.

The test now takes between 40 and 60 seconds for me. I also ran it
"under stress" by running all ES tests in one shell, while
simultaneously running 10 iterations of the old index tests. Each
iteration took on average about 90 seconds, which is much better
than the 20+ minutes we see in master on jenkins.

closes #10247
2015-04-03 23:21:55 -07:00
Ryan Ernst d379b3618e Mappings: Fix doc values representation to always serliaze if explicitly set
When doc values are explicitly set to the default value serialization
is skipped. This means the alternate way of specifying doc values,
through `fielddata.format: doc_values`, will take precedense if
present.

This change fixes doc values to always be serialized when an explicit value
was passed, so that it continues to take precedence over
`fielddata.format`.

closes #10297
closes #10302
2015-04-03 19:35:52 -07:00
Ryan Ernst 96fa466414 Tests: Skip Version.CURRENT for static bwc indexes
The current version is normally a snapshot while in development.
However, when the release process changes the snapshot flag to false,
this causes the static bwc tests to fail because they cannot
find an index for the current version.  Instead, this change
skips the current version, because there is no need to test
a verion's bwc against itself.

closes #10292
closes #10293
2015-04-03 19:25:43 -07:00
Martijn van Groningen 3f8908acfb Test: Not all shards maybe in a started state after the initial scroll search, but are after we do the stats call, so add ensureGreen to ensure we don't up with this discrepancy 2015-04-03 18:30:59 +02:00
Adrien Grand 24ca482918 Tests: Make OldIndexBackwardsCompatibilityTests copy to fewer replicas.
We recently increased the size of bw indexes and backward compatibility tests
are now taking more time so it makes sense to ask them to do a bit less. This
commit changes the number of replicas we try to copy primaries to from (2 or 3)
to (1 or 2).
2015-04-03 16:46:30 +02:00
Adrien Grand d3b1567f79 Tests: Add more assertions to SearchStatsTests. 2015-04-03 16:09:57 +02:00
Guillaume Dievart adcb782423 Update core-types.asciidoc 2015-04-03 14:12:29 +02:00
Adrien Grand 523033bce6 Test: Disable TRACE logging on aggregations tests. 2015-04-03 11:33:30 +02:00
Martijn van Groningen ef1f834cf9 inner hits: Make sure inner hits also work for nested fields defined in object field
Closes #10334
2015-04-03 08:57:10 +02:00
Igor Motov 5379fa04de Snapshot/Restore: separate repository registration
Separate repository registration to make sure that failure in registering one repository doesn't cause failures to register other repositories.

Closes #10351
2015-04-02 22:23:43 -04:00
Lee Hinman 8f13c5ad4d [TEST] Turn on more logging for testDataPathCanBeChanged 2015-04-02 20:11:33 -06:00
Eike Dehling 2fc2c8284a Mapping: add consistent serialization order for field data settings
Closes #10370
Closes #10318
2015-04-02 21:41:52 +02:00
Adrien Grand 1401075070 Tests: Speed up backward-compatibility tests for 1.1.0
1.1.0 is affected by #5817 which prevents merges from keeping up with the
indexing rate. As a consequence it generates lots of segments and makes bw
compat tests slow. So I added a special case for this version to index fewer
documents.
2015-04-02 19:11:12 +02:00
Tanguy Leroux 168238dab6 Add properties files to configure startup and installation scripts
Many scripts are used to start/stop and install/uninstall elasticsearch. These scripts share a lot of configuration properties like directory paths, max value for a setting, default user etc. Most of the values are identical but some of them are different depending of the platform (Debian-based or Redhat-based OS), depending of the way elasticsearch is started (shell script, systemd, sysv-init...) or the way it is installed (zip, rpm, deb...). Today the values are duplicated in multiple places, making it difficult to maintain the scripts or to update a value.

This pull request make this more uniform: values used in scripts must be defined in a common packaging.properties file. Each value can be overridden in another specific packaging.properties file for Debian or Redhat. All startup and installation scripts are filtered with the common then the custom packaging.properties files before being packaged as a zip/tar.gz/rpm/dpkf archive.
2015-04-02 18:09:43 +02:00
Adrien Grand e8a42c6954 Merge pull request #7961 from jpountz/enhancement/boolean_doc_values
Fielddata: Add doc values support to boolean fields.

Close #7961
2015-04-02 16:06:52 +02:00
Adrien Grand 08f93cf33f Add doc values support to boolean fields.
This pull request makes boolean handled like dates and ipv4 addresses: things
are stored as as numerics under the hood and aggregations add some special
formatting logic in order to return true/false in addition to 1/0.

For example, here is an output of a terms aggregation on a boolean field:
```
   "aggregations": {
      "top_f": {
         "doc_count_error_upper_bound": 0,
         "buckets": [
            {
               "key": 0,
               "key_as_string": "false",
               "doc_count": 2
            },
            {
               "key": 1,
               "key_as_string": "true",
               "doc_count": 1
            }
         ]
      }
   }
```

Sorted numeric doc values are used under the hood.

Close #4678
Close #7851
2015-04-02 15:40:46 +02:00
Tanguy Leroux 877b8fa27a Merge pull request #9532 from nickcanz/master
service.bat file should explicitly use the Windows find command.
2015-04-02 15:34:44 +02:00
Martijn van Groningen e390ef5bc1 inner hits: Make sure `size` of `0` works on the `inner_hits` level.
Closes #10358
2015-04-02 15:08:39 +02:00
Tanguy Leroux eeec90be79 [DOCS] Add verify parameter to snapshot documentation
Add verify parameter to snapshot documentation and remove 'verify' setting at FS repository level (not supported)
2015-04-02 14:23:31 +02:00
Britta Weber 3772bd6738 [TEST] more restrictive logging 2015-04-02 13:36:07 +02:00
Britta Weber 82071659de recovery state: fix concurrent access to file list
A shard recovery response might serialize a shard state at the same time that it is
modified by the recovery process. The test
RelocationTests.testMoveShardsWhileRelocation
failed because of this with a ConcurrentModificationException.

closes #10381
2015-04-02 12:37:12 +02:00
Christoph Büscher 2beda3953d Remove expansion of empty index arguments in RoutingTable
RoutingTables activePrimaryShardsGrouped(), allActiveShardsGrouped() and
allAssignedShardsGrouped() methods treated empty index array input
parameters as meaning "all" indices and expanded to the routing maps
keyset. However, the expansion of index names is now already done in
MetaData#concreteIndices(). Returning an empty index name list here
when a wildcard pattern didn't match any index name could lead to
problems like #9081 because the RoutingTable still expanded this
list of names to "_all". In case of e.g. the recovery endpoint this
could lead to problems.

Closes #9081
Closes #10148
2015-04-02 12:29:47 +02:00
Simon Willnauer d30d3b967e Merge pull request #10376 from dakrone/misc-addl-logging
Miscellaneous additional logging and cleanups
2015-04-02 12:19:52 +02:00
Adrien Grand 4d4dcef857 Merge pull request #10373 from djschny/issue10371
Add ability to specify a SizeBasedTriggeringPolicy for log configuration.

Close #10371
2015-04-02 11:17:00 +02:00
Britta Weber 4259ab78f3 [TEST] set mmn to avoid split brain 2015-04-02 10:51:14 +02:00
Britta Weber 4d95f6dc39 [TEST] increase logging for SharedClusterSnapshotRestoreTests.basicWorkFlowTest 2015-04-02 10:51:14 +02:00
wittyameta 728f834716 [DOCS] add wait_for_active_shards option to health.asciidoc 2015-04-02 09:33:54 +02:00
Lee Hinman 9ff217d89b Clean up logging and add additional logging regarding shadow engines
This fixes an issue where this was logged:

```
[node_t1] [test][0] flush with org.elasticsearch.action.admin.indices.flush.FlushRequest@65f6f1e
```

by adding a .toString() method to FlushRequest.

It also changes:

```
creating Index [test], shards [1]/[2]
```

to:

```
creating Index [test], shards [1]/[2s]
```

If shadow replicas are being used.
2015-04-01 11:49:26 -06:00
Simon Willnauer 1047e8bce5 [TEST] don't restrict index to nodes 2015-04-01 18:33:02 +02:00
Simon Willnauer efb82910a1 Merge pull request #9242 from reuben-sutton/remove_jsonp
Remove jsonp support and associated tests, closes #9108
2015-04-01 18:18:52 +02:00
Ryan Schneider 3126c9b39d add ability to specify a SizeBasedTriggeringPolicy for log configuration #10371 2015-04-01 11:32:01 -04:00
Reuben Sutton 85c221e9b1 Remove jsonp support and associated tests, closes #9108 2015-04-01 16:06:09 +01:00
Simon Willnauer dc38df2b20 [RESTORE] Don't reuse source index UUID on restore
Today we reuse the UUID of the source index on restore. This can create conflicts
with existing shard state on disk. This also causes multiple indices with the same
UUID. This commit preserves the UUID of an existing index or creates a new UUID for
a newly created index.
2015-04-01 15:56:26 +02:00
Shay Banon c8f996320c Remove unsafe options
For quite some time now, our networking layer makes sure to create safe messages as in not using the shared buffers. This is great, and we should remove the old support for "unsafe" notion in our codebase.
closes #10360
2015-04-01 15:11:20 +03:00
Christoph Büscher 285941f0d3 Removed unused import 2015-04-01 12:02:21 +02:00
Christoph Büscher fc04967eda Core: Remove potential NPE while resolving concrete indices from MetaData
Prevents a current edge case resolving concrete aliases or index names in cluster MetaData
that could potentialy lead to NullPointerException when the IndicesOptions don't allow
wildcard expansion and the method is called with aliasesOrIndices argument null or emtpy list.
This change adds a check for that and introduces randomized test that catches this.

Closes #10342
Closes #10339
2015-04-01 10:59:09 +02:00
Lucas Chi 7d08940c78 [DOCS] Update readme with direct link to the upgrade section 2015-04-01 10:40:48 +02:00
Martijn van Groningen 1c162ed34a inner hits: Fix bug where parse error is thrown if a inner filter is used in a nested filter/query.
Closes #10308
2015-03-31 22:44:39 +02:00
Boaz Leskes 54bfe53d51 Merge pull request #10349 from DavidWittman/typo-recovery-after-time
Fix typos for gateway.recover_after_time
2015-03-31 22:03:04 +02:00
David Wittman 3acf4ccb33 Fix typos for gateway.recover_after_time
There were a few references to the setting
`gateway.recovery_after_time`, which should instead be
`gateway.recover_after_time`.
2015-03-31 14:00:08 -05:00
Adrien Grand 9c1c335d02 Search contexts should not automatically be closed when scrolling.
Related to #9296
2015-03-31 20:10:09 +02:00
Britta Weber 567a50c29b [function_score] apply min_score to sub query score if no function provided
For optimization pruposes a function score query with an empty function
will just result in the original sub query. However, sometimes one might
want to use function_score query to actually filter out docs within for example
bool clauses by using the min_score functionallity.
Therefore the sub query should only be used without wrapping inside
a function_score query if min_score was also not set.

closes #10253
closes #10326
2015-03-31 16:16:53 +02:00
Britta Weber 17dffe222b [store] make sure shard active request works even if shard is still in post recovery
When deleting a shard th node that deletes th shard first checks if all shard copies are
started on other nodes. A message is sent to each node tand each node checks locally for
STARTED or RELOCATED.
However, it might happen that the shard is still in state POST_RECOVERY, like this:

shard is relocating from node1 to node2
1. relocated shard on node2 goes in POST_RECOVERY and node2 sends shard started to master
2. master updates routing table and sends new cluster state to node1 and node2
3. node1 processes the cluster state and asks node2 if it has the active shard
  before node2 processes the new cluster state (which would cause it to set the shard to started)
4. node2 sends back it does not have the shard started and so node1 does not delete it

This can be avoided by waiting until cluster state that sets the shard to started is actually processed.

closes #10018
2015-03-31 15:42:07 +02:00
Adrien Grand 8d204846df Remove leftover println. 2015-03-31 15:00:18 +02:00
Simon Willnauer 78d86bcf41 [STATE] Refactor state format to use incremental state IDs
Today there is a chance that the state version for shard, index or cluster
state goes backwards or is reset on a full restart etc. depending on
several factors not related to the state. To prevent any collisions
with already existing state files and to maintain write-once properties
this change introductes an incremental state ID instead of using the plain
state version. This also fixes a bug when the previous legacy state had a
greater version than the current state which causes an exception on node
startup or if left-over files are present.

Closes #10316
2015-03-31 14:17:07 +02:00
javanna ff6b605778 [TEST] fix SearchScrollTests, scroll doesn't support searchType count 2015-03-31 14:05:33 +02:00
javanna 83fb0a10e5 Scripting: remove support for script.disable_dynamic setting
Now that fine-grained script settings are supported (#10116) we can remove support for the script.disable_dynamic setting.

Same result as `script.disable_dynamic: false` can be obtained as follows:

```
script.inline: on
script.indexed: on
```
An exception is thrown at startup when the old setting is set, so we make sure we tell users they have to change it rather than ignoring the setting.

Closes #10286
2015-03-31 13:24:52 +02:00
Adrien Grand 7a595d7911 IndicesQueryCacheTests: Fix test bug.
The query cache is disabled on dfs_query_then_fetch so we need to enforce
query_then_fetch instead of relying on the randomized search type set by the
test framework.
2015-03-31 12:28:02 +02:00