Commit Graph

13388 Commits

Author SHA1 Message Date
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
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
Clinton Gormley 4b854d10bd Docs: Tidied up the field statistics docs 2015-05-24 15:12:44 +02:00
Robert Muir c08481f523 allow third party license analysis to run (com.mycila vs org.codehaus.mojo mess) 2015-05-23 08:40:40 -04:00
Robert Muir 9e7595655b Ensure shaded jar has manifest too 2015-05-23 08:37:50 -04:00
Robert Muir 3f539dcf08 Allow license generation to run 2015-05-23 08:23:37 -04:00
Robert Muir 46c328ae14 Merge pull request #11315 from rmuir/build_cleanup
remove build duplication
2015-05-23 07:14:01 -04:00
Robert Muir b462fd712a factor out static analysis 2015-05-23 01:33:37 -04:00
Robert Muir 5b1ecbf07f add snapshot repo (so we know where to get elasticsearch-parent from if needed) 2015-05-23 00:27:28 -04:00
Robert Muir 20da601e92 factor out code coverage 2015-05-23 00:25:50 -04:00
Robert Muir 38496c8265 remove duplicate test logging configuration 2015-05-22 23:55:27 -04:00
Robert Muir 5330e3423f remove build duplication 2015-05-22 23:23:59 -04:00
Robert Muir ca889286eb fix license headers 2015-05-22 18:23:54 -04:00