Commit Graph

13644 Commits

Author SHA1 Message Date
javanna ee26ab8bb4 Java api: add name setter to delete index template request and make default constructor public for AnalyzeRequest and DeleteIndexTemplateRequest
Closes #8122
Closes #8123
2015-05-27 11:22:37 +02:00
javanna fc28bc73f8 [DOCS] add kopf to site plugins 2015-05-27 10:28:53 +02:00
Ryan Schneider 8ec6bf7340 [DOCS] Update get.asciidoc
Updated to not mislead the reader that the data is actually gone when a document is updated. For example if you have 100GB of docs and update each one you'll only be able to access 100GB of the data, but there would theoretically be 200GB of doc data.

Closes #10375
2015-05-27 10:17:10 +02:00
Boaz Leskes 6d269cbf4d feedback 2015-05-27 10:29:37 +03:00
Boaz Leskes 7451b4708e Simplify Transport*OperationAction names
As a follow up to #11332, this commit simplifies more class names by remove the superfluous Operation:

TransportBroadcastOperationAction -> TransportBroadcastAction
TransportMasterNodeOperationAction -> TransportMasterNodeAction
TransportMasterNodeReadOperationAction -> TransportMasterNodeReadAction
TransportShardSingleOperationAction -> TransportSingleShardAction

Closes #11349
2015-05-27 09:25:58 +03:00
Lee Hinman 6646881bb6 [CORE] Read segment info from latest commit whenever possible
Instead of listing the directory to file the latest segments_N file, we
should re-use the generation/filename from the last commit. This allows
us to avoid potential race conditions on the filesystem as well as
reduce the number of directory listings performed.
2015-05-26 17:07:20 -06:00
Simon Willnauer fcccd45601 Be more lenient in EIT#waitForDocs
The count request now acts like search and barfs if all shards fail
this behavior changed and some tests like RecoveryWhileUnderLoadTests
relied on the lenient behavior of the old count API. This might be
a temporary solution to stop current test failures.

Relates to #11198
2015-05-26 21:39:20 +02:00
javanna 6c81a8daf3 Internal: count api to become a shortcut to the search api
The count api used to have its own execution path, although it would do the same (up to bugs!) of the search api. This commit makes it a shortcut to the search api with size set to 0. The change is made in a backwards compatible manner, by leaving all of the java api code around too, given that you may not want to get back a whole SearchResponse when asking only for number of hits matching a query, also cause migrating from countResponse.getCount() to searchResponse.getHits().totalHits() doesn't look great from a user perspective. We can always decide to drop more code around the count api if we want to break backwards compatibility on the java api, making it a shortcut on the rest layer only.

Closes #9117
Closes #11198
2015-05-26 19:12:11 +02:00
Alexander Reelsen 1fa21a76cf Documentation: Fix elasticsearch documentation build
The commit for closing #11033 was not building the asciidoc
documentation.
2015-05-26 18:16:12 +02:00
Alexander Reelsen 045f01c085 Infra for deprecation logging
Add support for a specific deprecation logging that can be used to turn
on in order to notify users of a specific feature, flag, setting,
parameter, ... being deprecated.

The deprecation logger logs with a "deprecation." prefix logge
(or "org.elasticsearch.deprecation." if full name is used), and outputs
the logging to a dedicated deprecation log file.

Deprecation logging are logged under the DEBUG category. The idea is not to
enabled them by default (under WARN or ERROR) when running embedded in
another application.

By default they are turned off (INFO), in order to turn it on, the
"deprecation" category need to be set to DEBUG. This can be set in the
logging file or using the cluster update settings API, see the documentation

Closes #11033
2015-05-26 17:44:52 +02:00
Michael McCandless 9d1f6f7615 a few more ImmutableSettings -> Settings 2015-05-26 09:54:44 -04:00
Michael McCandless 7efb36da54 Absorb ImmutableSettings into Settings 2015-05-26 09:40:29 -04:00
Michael McCandless 0706aeead1 Absorb ImmutableSettings into Settings 2015-05-26 09:38:45 -04:00
Michael McCandless 7aada44da3 Absorb ImmutableSettings into Settings 2015-05-26 09:36:17 -04:00
javanna 44fe99a3a8 [TEST] make filter_path a default parameter in java rest runner
Closes #11351
2015-05-26 15:34:45 +02:00
Michael McCandless a86d9e7908 Absorb ImmutableSettings into Settings 2015-05-26 09:34:33 -04:00
Michael McCandless 5af8412fc9 Absorb ImmutableSettings into Settings 2015-05-26 09:32:38 -04:00
Tanguy Leroux 820314db4e Change project.name to project.artifactId in bin/elasticsearch script because of 60519911b4 2015-05-26 15:27:59 +02:00
Alexander Reelsen b465e19e5f Release script: Always check for valid environment
In order to be sure that a release can be executed on the local machine,
the build_release script now checks for environment variables and tries
to execute a  couple of commands.

In order to easily check for a correctly setup environment, you can
run the following commands, which exits early and does not trigger a
release process.

```
python3 dev-tools/build_release.py --check-only
```
2015-05-26 14:43:29 +02:00
Michael McCandless f54dbc3060 Absorb ImmutableSettings into Settings 2015-05-26 08:08:58 -04:00
Michael McCandless c1ad335d15 Absorb ImmutableSettings into Settings 2015-05-26 08:08:12 -04:00
Michael McCandless adb9445607 Absorb ImmutableSettings into Settings 2015-05-26 08:07:05 -04:00
Michael McCandless 97e6016137 Absorb ImmutableSettings into Settings 2015-05-26 08:05:53 -04:00
Michael McCandless 8c52619436 Absorb ImmutableSettings into Settings 2015-05-26 08:03:20 -04:00
Tanguy Leroux ce63590bd6 API: Add response filtering with filter_path parameter
This change adds a new "filter_path" parameter that can be used to filter and reduce the responses returned by the REST API of elasticsearch.

For example, returning only the shards that failed to be optimized:
```
curl -XPOST 'localhost:9200/beer/_optimize?filter_path=_shards.failed'
{"_shards":{"failed":0}}%
```

It supports multiple filters (separated by a comma):
```
curl -XGET 'localhost:9200/_mapping?pretty&filter_path=*.mappings.*.properties.name,*.mappings.*.properties.title'
```

It also supports the YAML response format. Here it returns only the `_id` field of a newly indexed document:
```
curl -XPOST 'localhost:9200/library/book?filter_path=_id' -d '---hello:\n  world: 1\n'
---
_id: "AU0j64-b-stVfkvus5-A"
```

It also supports wildcards. Here it returns only the host name of every nodes in the cluster:
```
curl -XGET 'http://localhost:9200/_nodes/stats?filter_path=nodes.*.host*'
{"nodes":{"lvJHed8uQQu4brS-SXKsNA":{"host":"portable"}}}
```

And "**" can be used to include sub fields without knowing the exact path. Here it returns only the Lucene version of every segment:
```
curl 'http://localhost:9200/_segments?pretty&filter_path=indices.**.version'
{
  "indices" : {
    "beer" : {
      "shards" : {
        "0" : [ {
          "segments" : {
            "_0" : {
              "version" : "5.2.0"
            },
            "_1" : {
              "version" : "5.2.0"
            }
          }
        } ]
      }
    }
  }
}
```

Note that elasticsearch sometimes returns directly the raw value of a field, like the _source field. If you want to filter _source fields, you should consider combining the already existing _source parameter (see Get API for more details) with the filter_path parameter like this:

```
curl -XGET 'localhost:9200/_search?pretty&filter_path=hits.hits._source&_source=title'
{
  "hits" : {
    "hits" : [ {
      "_source":{"title":"Book #2"}
    }, {
      "_source":{"title":"Book #1"}
    }, {
      "_source":{"title":"Book #3"}
    } ]
  }
}
```
2015-05-26 13:51:04 +02:00
javanna 543f572d80 Highlighting: keep track of the original query only in HighlighterContext
We used to keep track of the rewritten query in the highlighter context to support custom rewriting done by our own postings highlighter fork. Now that we rely on lucene implementation, no rewrite happens, we can simply keep track of the original query and simplify code around it.

Closes #11317
2015-05-26 12:45:22 +02:00
Britta Weber 802b7b88fa [TEST] fix epected error message 2015-05-26 11:49:33 +02:00
Britta Weber 7c6869d875 Merge pull request #11303 from brwe/custom_analyzer_name
analyzers: custom analyzers names and aliases must not start with _
2015-05-26 11:44:10 +02:00
Britta Weber eeeb29f900 spell correct and add single quotes 2015-05-26 11:41:19 +02:00
Michael McCandless 464b15447f require setting name to Memory/ByteSizeValue parsers 2015-05-26 05:41:12 -04:00
David Pilato 60519911b4 [maven] fix paths for final artifact
We need to define an absolute path (based on `${project.basedir}`) instead of using related paths.
2015-05-26 11:40:57 +02:00
Britta Weber 37782c1745 analyzers: custom analyzers names and aliases must not start with _
closes #9596
2015-05-26 11:38:15 +02:00
Michael McCandless 4334404a20 Don't truncate TopDocs after rescoring
We were previously over-trimming the TopDocs such that you get
size-from hits instead of size, which is wrong when from != 0.

Closes #11127

Closes #11342
2015-05-26 04:43:18 -04:00
Michael McCandless 8958096754 don't truncate TopDocs after rescoring 2015-05-26 04:06:21 -04:00
Michael McCandless b03d7584b4 merged master 2015-05-26 03:54:08 -04:00
Britta Weber e97353e84a [TEST] don't check shard operations counter in ExceptionRetryTests 2015-05-26 09:00:16 +02:00
Igor Motov f0c18eb704 Snapshot/Restore: check that reading indices is allowed before creating their snapshots
Clean up of Snapshot/Restore cluster and index block handling.

Closes #11133
2015-05-25 18:21:41 -10:00
Simon Willnauer 430be0d7cb [TEST] Skip invalid random file names 2015-05-25 22:41:11 +02:00
Boaz Leskes 00ce0a18c5 Merge pull request #11332 from bleskes/replication_action
Rename TransportShardReplicationOperationAction to TransportReplicationAction
2015-05-25 22:49:04 +03:00
Boaz Leskes 20d575d257 Internal: Rename TransportShardReplicationOperationAction to TransportReplicationAction
TransportShardReplicationOperationAction is a mouthful and is the only thing we mean when we say replication.  This commit also changes some related friends.
2015-05-25 22:43:04 +03:00
Boaz Leskes b376a3fbfb Move index sealing terminology to synced flush
#10032 introduced the notion of sealing an index by marking it with a special read only marker, allowing for a couple of optimization to happen. The most important one was to speed up recoveries of shards where we know nothing has changed since they were online by skipping the file based sync phase. During the implementation we came up with a light notion which achieves the same recovery benefits but without the read only aspects which we dubbed synced flush. The fact that it was light weight and didn't put the index in read only mode, allowed us to do it automatically in the background which has great advantage. However we also felt the need to allow users to manually trigger this operation.

 The implementation at #11179 added the sync flush internal logic and the manual (rest) rest API. The name of the API was modeled after the sealing terminology which may end up being confusing. This commit changes the API name to match the internal synced flush naming, namely `{index}/_flush/synced'.

  On top of that it contains a couple other changes:
   - Remove all java client API. This feature is not supposed to be called programtically by applications but rather by admins.
   - Improve rest responses making structure similar to other (flush) API
   - Change IndexShard#getOperationsCount to exclude the internal +1 on open shard . it's confusing to get 1 while there are actually no ongoing operations
   - Some minor other clean ups
2015-05-25 22:32:32 +03:00
Alex Chan e31049988b [Docs] Fix minor spelling errors
Closes #11320
2015-05-25 19:56:43 +02:00
Michael McCandless 2b57dd7d3e Absorb ImmutableSettings into Settings
Now we have a single (final) Settings implementation.

Closes #11321
2015-05-25 13:14:01 -04:00
Tanguy Leroux 862cec5634 Packaging: Use of default CONF_DIR/CONF_FILE in plugin install
The bin/plugin script now uses the default CONF_DIR & CONF_FILE environment vars. This allows to install a plugin even if Elasticsearch has been installed with a RPM or a DEB package. This commit also adds testing files for TAR archive and plugins installation.

Closes #10673
2015-05-25 13:44:42 +02:00
Eduardo Gurgel 0f3b3c0787 Docs: Fix typo on percolate_format description
Closes #11215
2015-05-25 13:17:59 +02:00
Michael McCandless 5aaebb6d83 add missing units to tests 2015-05-25 06:48:34 -04:00
Michael McCandless 6a6df5f8ce always pass setting name to TimeValue.parseTimeValue; make units required 2015-05-25 05:33:58 -04:00
Michael McCandless dfd7122a53 add nocommits for Booleans parsing leniency 2015-05-25 05:30:41 -04:00
Clinton Gormley 4d27d751fb Docs: Move the page on facets into redirects.asciidoc 2015-05-24 23:34:23 +02:00
Clinton Gormley 6171ae6cc4 Docs: Added stub entries for pages deleted from 1.x 2015-05-24 17:57:34 +02:00