javanna
e8653f5156
Java api: IdsQueryBuilder to accept only non null ids and types
...
Types are still optional, but if you do provide them, they can't be null. Split the existing constructor that accepted nnull into two, one that accepts no arguments, and another one that accepts the types argument, which must be not null.
Also trimmed down different ways of setting ids, some were misleading as they would always add the ids to the existing ones and not set them, the add prefix makes that clear. Left `addIds` method that accepts a varargs argument. Added check for ids not be null.
2015-10-05 15:10:30 +02:00
javanna
eaafc62f53
[DOCS] added query-refactoring changes to 3.0 migrate guide
2015-09-25 14:55:37 +02:00
javanna
629ac8e014
Java api: remove TermsLookupQueryBuilder
...
TermsLookupQueryBuilder was left around only for bw comp reasons, but TermsQueryBuilder is its replacement. We can remove it now that it is clear query refactoring goes in master (3.0).
2015-09-25 11:44:05 +02:00
javanna
34de79370f
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/ElasticsearchException.java
2015-09-25 09:38:24 +02:00
Jason Tedor
4fe243a5ca
Merge pull request #13701 from jasontedor/fix-ping-timeout-settings-inconsistency
...
Fix ping timeout settings inconsistencies
2015-09-23 13:17:46 -04:00
Jason Tedor
d8b29f7beb
Fix ping timeout settings inconsistencies
...
This commit fixes ping timeout settings inconsistencies in
ZenDiscovery. In particular, the documentation refers to the ping
timeout setting as discovery.zen.ping_timeout but the code was
ultimately using discovery.zen.ping.timeout if this was set.
This commit also changes all instances of the raw string
“discovery.zen.ping_timeout” to the constant
o.e.d.z.ZenDiscovery.SETTING_PING_TIMEOUT.
Finally, this commit removes the legacy setting
"discovery.zen.initial_ping_timeout".
Closes #6579 , #9581 , #9908
2015-09-23 12:58:23 -04:00
Christoph Büscher
dbb01f5b43
Query Refactoring: Move MoreLikeThisQueryBuilder validation to constructor
...
The current MoreLikeThisQueryBuilder validation checks for existence of at
least one `like` text or item. This is hard to check in setters, so this PR
tries to change the construction of the query so that we can do these checks
already at construction time.
Changing to using arrays for fieldnames, likeTexts, likeItems, unlikeTexts
and unlikeItems. `likeTexts` and/or `likeItems` need to be specified at
construction time to validate we have at least one item there.
Relates to #10217
2015-09-23 18:20:46 +02:00
Antonio Bonuccelli
0149ed41f4
Update settings.asciidoc
...
generalising to single dash
2015-09-23 14:54:51 +02:00
Antonio Bonuccelli
8da0f89739
Order of command line flags
...
specifying the order required for cli -Des notation arguments
2015-09-23 14:54:50 +02:00
javanna
7eedd84dc3
Query refactoring: refactor query_string query and score functions
...
Refactor the function_score query so it can be parsed on the coordinating node, split parse into fromXContent and toQuery, make FunctionScoreQueryBuilder Writeable.
Closes #13653
2015-09-23 11:32:54 +02:00
Christoph Büscher
03035a28a3
Query Refactoring: moving validation to setters and constructors
...
Moving validation from validate() to constructors and setters for the
following query builders:
* GeoDistanceQueryBuilder
* GeoDistanceRangeQueryBuilder
* GeoPolygonQueryBuilder
* GeoShapeQueryBuilder
* GeohashCellQuery
* TermsQueryBuilder
Relates to #10217
2015-09-22 11:05:56 +02:00
Christoph Büscher
cc69de5c5f
Merge branch 'master' into feature/query-refactoring
2015-09-21 15:38:43 +02:00
Thomas Cucchietti
03488e3902
Docs: Update query_dsl.asciidoc
...
Minor orthographic fix
Closes #13452
2015-09-19 16:09:53 +02:00
Christoph Büscher
37b46fb79c
Query Refactoring: moving validation to constructors and setters
...
This PR is the second batch in moving the query validation we started
to collect in the validate() method to the corresponding setters
and constructors.
2015-09-17 23:30:42 +02:00
Christoph Büscher
887399eebf
Query Refactoring: moving validation to constructors and setters
...
This PR is an initial step to move the query validation we started
to collect in the validate() method to the corresponding setters
and constructors.
2015-09-17 13:57:34 +02:00
Alex Ksikes
a3c68f690b
Refactors MultiMatchQueryBuilder and Parser
...
Relates to #10217
This PR is against the query-refactoring branch.
Closes #13405
2015-09-16 13:41:22 +02:00
Christoph Büscher
8fb1aa9781
Refactors GeoDistanceQueryBuilder/-Parser
...
Splits parsing and Lucene query generation. Switches from storing lat/lon
separately to using GeoPoint instead.
Relates to #10217
2015-09-16 11:15:32 +02:00
Alex Ksikes
a13336da54
Refactors MoreLikeThisQueryBuilder and Parser
...
Relates to #10217
This PR is against the query-refactoring branch.
Closes #13486
2015-09-16 02:09:38 +02:00
javanna
73f7df510e
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/index/query/HasChildQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java
core/src/main/java/org/elasticsearch/index/query/HasParentQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java
core/src/main/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryParser.java
core/src/main/java/org/elasticsearch/index/query/functionscore/factor/FactorParser.java
core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java
core/src/test/java/org/elasticsearch/benchmark/search/child/ChildSearchBenchmark.java
core/src/test/java/org/elasticsearch/benchmark/search/child/ChildSearchShortCircuitBenchmark.java
core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java
core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
docs/reference/query-dsl/has-parent-query.asciidoc
2015-09-11 14:15:12 +02:00
Adrien Grand
86f1b07df0
Docs: Remove docs for the `filtered`, `and`, `or` and `(f)query` queries.
2015-09-11 11:00:54 +02:00
Nik Everett
e4981968ad
[search] Limit the size of the result window
...
Requesting a million hits, or page 100,000 is always a bad idea, but users
may not be aware of this. This adds a per-index limit on the maximum size +
from that can be requested which defaults to 10,000.
This should not interfere with deep-scrolling.
Closes #9311
2015-09-10 15:38:29 -04:00
Martijn van Groningen
ab0847e0df
parent/child: several cleanups
...
* Dropped ScoreType in favour of Lucene's ScoreMode
* Removed `score_type` option from `has_child` and `has_parent` queries in favour for the already existing `score_mode` option.
* Removed the score mode `sum` in favour for the already existing `total` score mode. (`sum` doesn't exist in Lucene's ScoreMode class)
* If `max_children` is set to `0` it now really means that zero children are allowed to match.
2015-09-10 17:15:41 +02:00
javanna
56b3db6ba3
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/index/query/AndQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/AndQueryParser.java
core/src/main/java/org/elasticsearch/index/query/FQueryFilterParser.java
core/src/main/java/org/elasticsearch/index/query/FilteredQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/FilteredQueryParser.java
core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java
core/src/main/java/org/elasticsearch/index/query/IndicesQueryParser.java
core/src/main/java/org/elasticsearch/index/query/LimitQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/LimitQueryParser.java
core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryParser.java
core/src/main/java/org/elasticsearch/index/query/OrQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/OrQueryParser.java
core/src/main/java/org/elasticsearch/index/query/QueryFilterBuilder.java
core/src/main/java/org/elasticsearch/index/query/QueryFilterParser.java
core/src/main/java/org/elasticsearch/index/query/QueryParseContext.java
core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java
core/src/main/java/org/elasticsearch/indices/query/IndicesQueriesRegistry.java
core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortParser.java
core/src/main/java/org/elasticsearch/search/sort/SortParseElement.java
core/src/test/java/org/elasticsearch/benchmark/search/child/ChildSearchShortCircuitBenchmark.java
core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
2015-09-10 15:52:28 +02:00
Martijn van Groningen
2eadc6d595
nested sorting: If sorting by nested field then the `nested_path` should always be specified.
...
Closes #13420
2015-09-10 12:21:12 +02:00
Christoph Büscher
90fac17a2d
Query refactoring: MatchQueryBuilder
...
This add equals, hashcode, read/write methods, separates toQuery and JSON parsing and adds tests.
Also moving MatchQueryBuilder.Type to MatchQuery to MatchQuery, adding serialization and hashcode,
equals there.
Relates to #10217
2015-09-10 12:14:55 +02:00
javanna
484fcd49e5
Query refactoring: query_string
...
Relates to #10217
2015-09-10 10:09:24 +02:00
javanna
db705ab460
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/index/mapper/internal/ParentFieldMapper.java
core/src/main/java/org/elasticsearch/index/query/HasChildQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java
core/src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java
core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryParser.java
core/src/main/java/org/elasticsearch/index/search/child/ChildrenQuery.java
core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTestCase.java
core/src/test/java/org/elasticsearch/index/search/child/ChildrenConstantScoreQueryTests.java
core/src/test/java/org/elasticsearch/index/search/child/ChildrenQueryTests.java
core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java
core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
core/src/test/resources/org/elasticsearch/index/query/simple-query-string.json
2015-09-09 17:08:22 +02:00
Martijn van Groningen
2fb2a12c52
Removed pre 2.x parent child implementation
2015-09-09 13:21:40 +02:00
Alex Ksikes
a45ee273e3
MLT: builder takes a new Item object like its parser
...
Previously the parser could take any Term Vectors request, but this would be
not the case of the builder which would still use MultiGetRequest.Item. This
introduces a new Item class which is used by both the builder and parser.
Beyond that the rest is mostly cleanups such as:
1) Deprecating the ignoreLike methods, in favor to using unlike.
2) Deprecating and renaming MoreLikeThisBuilder#addItem to addLikeItem.
3) Ordering the methods of MoreLikeThisBuilder more logically.
This change is needed for the upcoming query refactoring of MLT.
Closes #13372
2015-09-09 11:40:27 +02:00
Ryan Ernst
55795f8ec2
Merge pull request #13383 from rjernst/go_away_transport_paths
...
Remove environment from transport client
2015-09-08 13:28:21 -07:00
David Pilato
81223179df
[doc] Java add missing breaking changes
...
Closes #13151
2015-09-08 21:23:20 +02:00
Ryan Ernst
86ffa38ec7
Add migration guide note about transport client changes to
...
settings/environment
2015-09-08 10:22:46 -07:00
Simon Willnauer
18bec264f9
Split HasChildQueryParser into toQuery and formXContent
...
This is an intial commit that splits HasChildQueryParser / Builder into
the two seperate steps. This one is particularly nasty since it transports
a pretty wild InnerHits object that needs heavy refactoring. Yet, this commit
has still some nocommits and needs more tests and maybe another cleanup but
it's a start to get the code out there.
2015-09-08 17:11:57 +02:00
javanna
f2605b34d6
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java
2015-09-08 16:11:22 +02:00
Clinton Gormley
2c20658204
Docs: Added deprecation notice for _timestamp and _ttl
2015-09-07 21:16:19 +02:00
Adrien Grand
0c26e7cd83
Remove the scan and count search types.
...
These search types have been deprecated in 2.1 and 2.0 respectively, and will
be removed in 3.0.
2015-09-07 15:18:45 +02:00
javanna
52be313c69
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/elasticsearch/index/query/BoolQueryParser.java
core/src/main/java/org/elasticsearch/index/query/IdsQueryParser.java
core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java
core/src/main/java/org/elasticsearch/index/query/TemplateQueryParser.java
core/src/main/java/org/elasticsearch/index/query/TermsQueryParser.java
core/src/main/java/org/elasticsearch/index/query/functionscore/fieldvaluefactor/FieldValueFactorFunctionParser.java
core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/GND.java
core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/JLHScore.java
core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/NXYSignificanceHeuristic.java
core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/PercentageScore.java
core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java
core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
2015-09-02 16:00:35 +02:00
xuzha
f46e66e7d0
Remove the experimental indices.fielddata.cache.expire
...
closes #10781
2015-09-01 00:40:04 -07:00
javanna
faf526dccb
Merge branch 'master' into feature/query-refactoring
2015-08-31 13:28:48 +02:00
Clinton Gormley
40dbba4e64
Update settings.asciidoc
...
Added removal of merge and merge throttling settings to breaking changes
2015-08-28 18:31:54 +02:00
Clinton Gormley
0331e444e6
Update mapping.asciidoc
...
Added fielddata format removal to breaking changes docs
2015-08-28 18:12:54 +02:00
Nik Everett
54639478c0
Merge pull request #13180 from nik9000/cat_non_verbose
...
Default _cat verbose to false
2015-08-28 11:59:29 -04:00
Clinton Gormley
a46368310a
Update mapping.asciidoc
...
Add type name length restriction to breaking changes docs.
2015-08-28 17:52:55 +02:00
Nik Everett
8a75d33ee6
Remove migration note about cat verbosity
...
Its no longer true.
2015-08-28 11:24:58 -04:00
javanna
78d097de39
Merge branch 'master' into feature/query-refactoring
...
Conflicts:
core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java
core/src/main/java/org/elasticsearch/index/query/AndQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/AndQueryParser.java
core/src/main/java/org/elasticsearch/index/query/BoolQueryParser.java
core/src/main/java/org/elasticsearch/index/query/DisMaxQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/DisMaxQueryParser.java
core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryParser.java
core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java
core/src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java
core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryParser.java
core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java
core/src/main/java/org/elasticsearch/index/query/OrQueryBuilder.java
core/src/main/java/org/elasticsearch/index/query/OrQueryParser.java
core/src/main/java/org/elasticsearch/index/query/PrefixQueryParser.java
core/src/main/java/org/elasticsearch/index/query/RegexpQueryParser.java
core/src/main/java/org/elasticsearch/index/query/SpanNearQueryParser.java
core/src/main/java/org/elasticsearch/index/query/SpanOrQueryParser.java
core/src/main/java/org/elasticsearch/index/query/TermQueryParser.java
core/src/main/java/org/elasticsearch/index/query/TermsQueryParser.java
core/src/main/java/org/elasticsearch/index/query/support/InnerHitsQueryParserHelper.java
core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
2015-08-28 10:49:28 +02:00
Nik Everett
9eb684da51
Default detect_noop to true
...
detect_noop is pretty cheap and noop updates compartively expensive so this
feels like a sensible default.
Also had to do some testing and documentation around how _ttl works with
detect_noop.
Closes #11282
2015-08-27 10:34:18 -04:00
Dan Tuffery
d8298e1d3a
Update query_dsl.asciidoc
...
Fixed typo.'
2015-08-27 12:47:15 +02:00
Ryan Ernst
fdf8e67de3
Merge branch 'master' into docs/multicast
2015-08-26 19:42:13 -07:00
Ryan Ernst
7a61adf8c4
Add links to multicast and dbq plugins
2015-08-26 19:40:00 -07:00
xuzha
fb2be6d6a1
The name "position_offset_gap" is confusing because Lucene has three
...
similar sounding things:
* Analyzer#getPositionIncrementGap
* Analyzer#getOffsetGap
* IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS and
* FieldType#storeTermVectorOffsets
Rename position_offset_gap to position_increment_gap
closes #13056
2015-08-26 14:56:35 -07:00