Commit Graph

12180 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
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
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
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
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
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
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 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 2635bfdd89 Merge pull request #11312 from rmuir/pkg_priv
make some sec mgr / bootup classes package private and final.
2015-05-22 16:54:21 -04:00
Robert Muir 6a32af1990 make some sec mgr / bootup classes package private and final.
These don't need to be accessible except by bootstrap.
2015-05-22 16:45:48 -04:00
Ryan Ernst 2e9f27a00c Merge pull request #11311 from rjernst/lucene/r1681214
Upgrade to lucene-5.2.0-snapshot-1681214
2015-05-22 13:40:27 -07:00
Ryan Ernst 3ff839d35f Upgrade to lucene-5.2.0-snapshot-1681214 2015-05-22 13:39:58 -07:00
jaymode fd7d6caba7 only load a plugin once from the classpath
Today, when loading plugins from the classpath we take the enumeration
given to us by the classloader and attempt to load every URL. This can
cause issues as certain classloaders, such as groovy's, will return the same
URL multiple times in the enumeration. When this happens, startup can fail
with guice errors as bindings have already been registered.

To workaround this, we create a set from the URLs returned by the classloader
to provide uniqueness.
2015-05-22 15:18:22 -04:00
Simon Willnauer d33f0e2527 Add basic javadocs to TransportNodesListGatewayStartedShards 2015-05-22 21:14:45 +02:00
Jack Conradson f47d993715 Search: Refactor of MultiValueMode removing apply and reduce
Simplification of MultiValueMode by removing the apply and reduce
methods for each mode. This creates a more consistent environment for
sorting methods since all sorting must now go through select methods.
This allows for better error handling and better encapsulation for
sorting fields with multiple values.

Note that apply and reduce had inconsistencies in the code base
prior to this change since different calls were assuming that the
accumulator for apply was the first input versus the second input.

Also added is an UnsortedNumericDoubleValues interface to allow
customized values to be input into the different sort modes. This
prevents the need for apply/reduce outside of MultiValueMode.

closes #11290
2015-05-22 10:10:58 -07:00
Shay Banon 2eaaef571c Merge pull request #11304 from kimchy/upgrade_netty_3_10_3
Upgrade to Netty 3.10.3
2015-05-22 18:42:16 +02:00
Britta Weber 4d0b40ca52 Merge pull request #11235 from nik9000/seal_docs
Rewrote some _seal documentation
2015-05-22 18:24:23 +02:00
Alexander Reelsen 85720d8a1c Logging: Add logging for failed TTL purges
In order to get some information if the TTL purger thread could
successfully delete all documents per bulk exection, this commit
adds some logging. TRACE level logging will potentially contain
a lot of information about all the bulk failures.

Closes #11019
2015-05-22 17:40:02 +02:00
Clinton Gormley cde2c91b5a Docs: Example blocks can't contain warnings 2015-05-22 17:37:58 +02:00
Shay Banon 2f00a27042 Upgrade to Netty 3.10.3 2015-05-22 17:37:44 +02:00
Clinton Gormley 631e03c872 Docs: Tidied up term vectors docs
Moved annotations out of titles
Made the example titles into example blocks
2015-05-22 17:19:12 +02:00
Nik Everett 6da1e858dc Rewrote some _seal documentation
The first two paragraphs were confusing to me so I tried to rewrite them.

I removed some passive voice because it irks me.
2015-05-22 10:51:21 -04:00
markharwood 8c3500a676 Aggregation fix: Sampler agg could not be used with Terms agg’s order.
The Sampler agg was not capable of collecting samples for more than one parent bucket.
Added a Junit test case and changed BestDocsDeferringCollector to internally maintain collections per parent bucket.

Closes #10719
2015-05-22 14:25:41 +01:00
Clinton Gormley 20279a2556 Docs: Rename reference docs to Elasticsearch Reference 2015-05-22 14:49:11 +02:00