Commit Graph

21481 Commits

Author SHA1 Message Date
bloublou 83944c5628 Typo correction heap_size.asciidoc (#17745)
* Typo correction Xms Xmx

Typo correction on "-Xms4000mb -Xmx4000mb"

* Change mb to m for Xms/Xmx
2016-04-14 20:37:37 +02:00
Ryan Ernst 125473dc9f Mappings: Support dots in field names when mapping exists
In 2.0 we began restricting fields to not contains dots in their names.
This change adds back part of dots in fieldnames support. Specifically,
it allows indexing documents that contain dots in the field names, when
the correct corresponding mappers exist. For example, if mappings
contain an object field `foo`, and a subfield `bar`, then indexing a
document with `foo.bar` will work.

see #15951
2016-04-14 11:31:45 -07:00
Jason Tedor ea26e86880 Actually restore lost Node#start no-op check
This commit really reverts the inadvertent removal of allowing duplicate
calls to Node#start to be a no-op (but was mistakenly restored to
Node#stop in ddfa3a661510f25c2ce431dfd6fb86ac11eb8888).
2016-04-14 14:26:04 -04:00
Jason Tedor f87c599ff1 Revert "Restore lost Node#start no-op check"
This reverts commit ddfa3a661510f25c2ce431dfd6fb86ac11eb8888.
2016-04-14 14:26:04 -04:00
jaymode f35cfc3715 Copy checkstyle config to allow running from a jar
The checkstyle configuration files were being accessed as resources within the project and
being converted from a URL to a File by gradle. This works when the build tools project is being
referenced as a local project. However, when using the published jar the URL points to a resource
in the jar file, that URL cannot be converted to a File object and causes the build to fail.

This change copies the files into a `checkstyle` directory in the project build folder and always uses
File objects pointing to the copied files.
2016-04-14 13:33:10 -04:00
Nik Everett 3197f7f7d8 Remove PROTOTYPE from filter aggregation
and cut it to registerAggregation

Relates to #17085
2016-04-14 12:37:40 -04:00
Adrien Grand 0c9aca94d4 Disallow fielddata loading on text fields that are not indexed. #17747
If a field is not indexed, we cannot load fielddata for it.
2016-04-14 18:11:11 +02:00
Colin Goodheart-Smithe 90d044309f Merge pull request #17710 from colings86/deprecate/indicesQuery
Deprecate Indices query
2016-04-14 17:09:42 +01:00
Adrien Grand d84c643f58 Use the new points API to index numeric fields. #17746
This makes all numeric fields including `date`, `ip` and `token_count` use
points instead of the inverted index as a lookup structure. This is expected
to perform worse for exact queries, but faster for range queries. It also
requires less storage.

Notes about how the change works:
 - Numeric mappers have been split into a legacy version that is essentially
   the current mapper, and a new version that uses points, eg.
   LegacyDateFieldMapper and DateFieldMapper.
 - Since new and old fields have the same names, the decision about which one
   to use is made based on the index creation version.
 - If you try to force using a legacy field on a new index or a field that uses
   points on an old index, you will get an exception.
 - IP addresses now support IPv6 via Lucene's InetAddressPoint and store them
   in SORTED_SET doc values using the same encoding (fixed length of 16 bytes
   and sortable).
 - The internal MappedFieldType that is stored by the new mappers does not have
   any of the points-related properties set. Instead, it keeps setting the index
   options when parsing the `index` property of mappings and does
   `if (fieldType.indexOptions() != IndexOptions.NONE) { // add point field }`
   when parsing documents.

Known issues that won't fix:
 - You can't use numeric fields in significant terms aggregations anymore since
   this requires document frequencies, which points do not record.
 - Term queries on numeric fields will now return constant scores instead of
   giving better scores to the rare values.

Known issues that we could work around (in follow-up PRs, this one is too large
already):
 - Range queries on `ip` addresses only work if both the lower and upper bounds
   are inclusive (exclusive bounds are not exposed in Lucene). We could either
   decide to implement it, or drop range support entirely and tell users to
   query subnets using the CIDR notation instead.
 - Since IP addresses now use a different representation for doc values,
   aggregations will fail when running a terms aggregation on an ip field on a
   list of indices that contains both pre-5.0 and 5.0 indices.
 - The ip range aggregation does not work on the new ip field. We need to either
   implement range aggs for SORTED_SET doc values or drop support for ip ranges
   and tell users to use filters instead. #17700

Closes #16751
Closes #17007
Closes #11513
2016-04-14 17:56:23 +02:00
Nik Everett 9080f51340 NORELEASE for getWriteableName in aggregations base class 2016-04-14 11:33:03 -04:00
Nik Everett f095e64825 Remove PROTOTYPE from histogram aggregations 2016-04-14 11:22:52 -04:00
Ali Beyad b87fd54ba9 Improvements to the IndicesService class
This commit contains the following improvements/fixes:
  1. Renaming method names and variables to better reflect the purpose
of the method and the semantics of the variable.
  2. For deleting indexes, replace the closed parameter passed to the
delete index/store methods with obtaining the index's state from the
IndexSettings that is already passed in.
  3. Added tests to the IndexWithShadowReplicaIT suite, some of which
show issues in the shadow replica delete process that are captured in
Github issue 17695.

Closes #17638
2016-04-14 11:14:02 -04:00
Christoph Büscher c9cb1de6cb Remove parser argument from methods where we already pass in a parse context
When we pass both XContentParser and QueryParseContext to a method this can be trappy because 
we cannot make sure that the parser contained in the context and the parser passed as an argument 
are the same. 
This removes the parser argument from methods where we currently have both the parser and the parse 
context as arguments and instead retrieves the parse from the context inside the method.
2016-04-14 17:09:52 +02:00
Nik Everett 348ad7a42e Label method as @SafeVarargs 2016-04-14 10:45:58 -04:00
Nik Everett eecec97274 Fix funny generics in request size limit test 2016-04-14 10:45:58 -04:00
Nik Everett eb71918878 Add SearchAfter's validation back to the setter
It was part of the serialization but I removed it to convert to
writeGenericValue.
2016-04-14 10:31:35 -04:00
Nik Everett f1ad5254e4 Switch SearchAfterBuilder to writeGenericValue
and remove its PROTOTYPE.

Relates to #17085
2016-04-14 10:31:27 -04:00
Nik Everett 8ad0070cea Remove remaining PROTOTYPEs from org.elasticsearch.search.suggest 2016-04-14 10:30:31 -04:00
Colin Goodheart-Smithe c595322d90 Adds ignore_unmapped option to geo queries
The change adds a new option to the geo_* queries: ignore_unmapped. If this option is set to false, the toQuery method on the QueryBuilder will throw an exception if the field specified in the query is unmapped. If the option is set to true, the toQuery method on the QueryBuilder will return a MatchNoDocsQuery. The default value is false so the queries work how they do today (throwing an exception on unmapped field)
2016-04-14 15:29:07 +01:00
Christoph Büscher bccf8a39c4 Removing aggregations_binary support from AggregatorParsers 2016-04-14 16:22:27 +02:00
Nik Everett 18f8f3f67a Cleanup after removing StreamableReader
Javadoc and unused imports!
2016-04-14 10:22:23 -04:00
Nik Everett b8fa7abf6a Remove StreamableReader
It's use tempted the creation of PROTOTYPEs. The only classes that
legitimately implement a readFrom method are those extending from
Diffable - such behavior is part of cluster state management and
out of scope for the PROTOTYPE cleanup.
2016-04-14 10:22:23 -04:00
Christoph Büscher e15e7f7e6e Remove parser argument from methods where we already pass in a parse context
When we pass down both parser and QueryParseContext to a method, we cannot
make sure that the parser contained in the context and the parser that is
parsed as an argument have the same state. This removes the parser argument
from methods where we currently have both the parser and the parse context
as arguments and instead retrieves the parse from the context inside the
method.
2016-04-14 16:18:05 +02:00
Jason Tedor ed3a71fa2b Fix JvmInfoTests#testUseG1GC to include OpenJDK VMs
Since OpenJDK virtual machines have G1 GC but do not have a java.vm.name
that contains HotSpot, this test fails on OpenJDK. Instead, the
java.vm.name condition should be expanded to include OpenJDK virtual
machines.
2016-04-14 10:09:55 -04:00
Nik Everett 1c5449fe1a Remove PROTOTYPE from scripted_metric aggregation
and cut it to registerAggregation.

Relates to #17085
2016-04-14 10:05:26 -04:00
Yannick Welsch b7a1baa801 Simplify ActionListenerResponseHandler by adding response supplier (#17752) 2016-04-14 15:46:55 +02:00
Adrien Grand b3eef99120 Remove FieldStats.Float. #17749
Since doubles can represent all floats accurately, we can just use
FieldStats.Double instead.
2016-04-14 15:03:35 +02:00
Martijn van Groningen 2928fd6ef3 Cleanup query builder for inner hits construction.
* Inner hits can now only be provided and prepared via setter in the nested, has_child and has_parent query.
* Also made `score_mode` a required constructor parameter.
* Moved has_child's min_child/max_children validation from doToQuery(...) to a setter.
2016-04-14 14:43:21 +02:00
Jason Tedor c9ada75e35 Merge pull request #17740 from jasontedor/g1gc-tests
Pass test JVM arguments to test nodes
2016-04-14 08:08:11 -04:00
Jason Tedor 79d3415210 Help JDK 9 type inference in ShardStateIT.java
The JDK 9 compiler type inference gets confused, so we need to help it
here.
2016-04-14 07:43:41 -04:00
Jason Tedor 4b801f54d1 Add test that JvmInfo correctly determines G1 GC
This commit adds a simple test that JvmInfo is correctly able to
determine whether or not G1 GC is running. As the JvmInfo G1 GC logic is
only applies to HotSpot, the test is constructed to do the same. The
test determines whether or not G1 GC is running by inspecting the test
JVM argument line.
2016-04-14 07:43:40 -04:00
Nik Everett dd3b4a1e50 Add {} to ifs in org.apache.lucene 2016-04-14 07:38:08 -04:00
Daniel Mitterdorfer e87b09e8dd Temporarily disable CircuitBreakerServiceIT.testParentChecking() 2016-04-14 13:07:11 +02:00
Colin Goodheart-Smithe 686aff1545 Adds ignore_unmapped option to nested and P/C queries
The change adds a new option to the `nested`, `has_parent`, `has_children` and `parent_id` queries: `ignore_unmapped`. If this option is set to false, the `toQuery` method on the QueryBuilder will throw an exception if the type/path specified in the query is unmapped. If the option is set to true, the `toQuery` method on the QueryBuilder will return a MatchNoDocsQuery. The default value is `false`so the queries work how they do today (throwing an exception on unmapped paths/types)
2016-04-14 10:34:30 +01:00
Clinton Gormley acec464eb8 Docs: Clarified the purpose of the parent_id query 2016-04-14 11:25:26 +02:00
Daniel Mitterdorfer c22d93f7cc Increase breaker limit in NettyHttpRequestSizeLimitIT
With the previous breaker limit spurious failures on transport level
can happen in the test. With the new limit we ensure that the breaker
breaks due to a too large HTTP request instead.
2016-04-14 10:12:45 +02:00
Adrien Grand 1c858b57c4 Fix test bug in ZenDiscoveryIT. 2016-04-14 09:52:25 +02:00
Colin Goodheart-Smithe f7ef600644 Aggregations: Adds serialisation of sigma to extended_stats_bucket pipeline aggregation
Previously the sigma variable in the `extended_stats_bucket` pipeline aggregation was not being serialised in `ExtendedStatsBucketPipelineAggregator`. This PR fixes that.

It also corrects the initial value of sumOfSquares to be 0.

Closes #17701
2016-04-14 08:28:56 +01:00
Nik Everett 86a9365c53 Small format changes in script and monitor packages
Just three files - just adding {}s to if and for statements or making
them single line.
2016-04-13 22:02:42 -04:00
Nik Everett 0386d8ec84 Remove PROTOTYPE from ScriptField
Relates to #17085
2016-04-13 21:30:01 -04:00
Jason Tedor 2d1ec2ee9d Remove unused import from NodeInfo.groovy 2016-04-13 20:49:35 -04:00
Jason Tedor 6133214b27 Pass test JVM arguments to test nodes
This commit passes test JVM arguments (from the system property
tests.jvm.argline) through to the test nodes that are spun up for
integration tests.
2016-04-13 20:48:41 -04:00
Sergii Golubev 434a563fe0 terms-aggregation.asciidoc tiny edit 2016-04-13 16:51:47 -06:00
Jason Tedor 666172284b Refactor BootstrapCheckTests to use expectThrows
This commit modifies all uses of the pattern try/catch/assert in
BootstrapCheckTests to use expectThrows/assert.

Closes #17731
2016-04-13 18:41:14 -04:00
Jason Tedor 7297580170 Simplify JVM options
This commit simplifies the default JVM options that ship with
Elasticsearch. In particular, expert settings that were previously
configurable via environment variables have been removed from the
default configuration file. Further, the heap size settings have been
moved to the top of the file with a clearer message that is in
concordance with their importance.

Closes #17714
2016-04-13 17:59:59 -04:00
Martijn van Groningen 16fa3e546e docs: remove mention of file based grok pattern 2016-04-13 22:51:12 +02:00
Nik Everett 3d5def0789 Remove remaining PROTOTYPEs from org.elasticsearch.index.query
Relates to #17085
2016-04-13 16:16:28 -04:00
Jason Tedor 11648cbff6 Merge pull request #17728 from jasontedor/heap-size
Add heap size bootstrap check
2016-04-13 15:11:17 -04:00
Jason Tedor 4f5d73bcb7 Add heap size bootstrap check
This commit adds a bootstrap check to ensure that the initial heap size
and max heap size are set equal to each other.
2016-04-13 15:10:31 -04:00
Lee Hinman e38e4514a8 Merge pull request #17722 from dakrone/fix-vagrant-output
[TEST] Fix extra backslash causing sed to hang
2016-04-13 12:45:03 -06:00