Colin Goodheart-Smithe
f3b581a6e0
Added ext section to search request for plugins that extend the fetch phase
...
tested with term vectors fetch
2015-09-25 09:40:16 +01:00
Simon Willnauer
78d6d2987f
fix groovy tests - we don't pass json anymore so no need to double escape quotes
2015-09-24 16:55:28 +02:00
Colin Goodheart-Smithe
35fc73f094
fix to make parseSource in SearchService work with source overriding template
2015-09-24 15:48:55 +01:00
Colin Goodheart-Smithe
bd42d26a76
text fix
2015-09-24 15:19:34 +01:00
Colin Goodheart-Smithe
67237ba269
test fixes
2015-09-24 15:16:16 +01:00
Colin Goodheart-Smithe
a9c6e4c051
Merge branch 'feature/query-refactoring' into feature/search-request-refactoring
...
# Conflicts:
# core/src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java
# core/src/main/java/org/elasticsearch/index/query/TemplateQueryParser.java
2015-09-24 14:33:35 +01:00
Colin Goodheart-Smithe
851af9e100
fixing up NOCOMMITs and making the IndicesQueryParserService not serialise the QueryBuilder to and from son
2015-09-24 14:20:50 +01:00
javanna
8976934d3b
Remove IndexQueryParseService#parse methods used only in tests
...
SimpleIndexQueryParserTests was the main responsible: deleted lots of duplicated tests, moved the ones that made sense to keep to their corresponding unit tests (note they were ESSingleNode tests before while are now converted to unit tests).
Closes #13750
2015-09-24 13:35:36 +02:00
Christoph Büscher
eb8ea63626
Query Refactoring: remove deprecated methods and temporary classes
...
After all queries now have a `toQuery` method and the parsers all
support `fromXContent` it is possible to remove the following
workarounds and deprecated methods we kept around while doing the
refactoring:
* remove the BaseQueryParser and BaseQueryParserTemp. All parsers
implement QueryParser directly now
* remove deprecated methods in QueryParseContext that either returned
a Query or a Filter.
* remove the temporary QueryWrapperQueryBuilder
Relates to #10217
2015-09-24 12:51:19 +02:00
Colin Goodheart-Smithe
510d1896f7
Revert "correct IndexQueryParserService.parse(QueryBuilder<?>) so that it doesn't convert to JSON and back again"
...
This reverts commit cc9519eee3
.
2015-09-24 00:00:09 +01:00
Colin Goodheart-Smithe
cc9519eee3
correct IndexQueryParserService.parse(QueryBuilder<?>) so that it doesn't convert to JSON and back again
2015-09-23 23:58:13 +01:00
Colin Goodheart-Smithe
f54155195a
fix lang js rest test (hopefully)
2015-09-23 23:34:42 +01:00
Colin Goodheart-Smithe
ce7dde08d0
fix SearchSourceBuilder.fromXContent to allow sort to be an object
2015-09-23 23:12:36 +01:00
Colin Goodheart-Smithe
a163a0fc89
fixed script language plugins rest tests to use correct script syntax
2015-09-23 22:47:37 +01:00
Colin Goodheart-Smithe
3c9e69e15f
Parse query from deleteByQuery request body
2015-09-23 22:06:35 +01:00
Colin Goodheart-Smithe
6d307a3cfd
delete by query rest test fix (maybe)
2015-09-23 21:42:09 +01:00
Colin Goodheart-Smithe
2dce527b81
rest test fixes (hopefully)
2015-09-23 21:15:13 +01:00
Simon Willnauer
c93eeb88ca
fix inner_hits parsing in SearchService
2015-09-23 22:05:49 +02:00
Colin Goodheart-Smithe
4996b07205
update rest tests to expect default boost to be returned in warmer responses
2015-09-23 21:02:55 +01:00
Colin Goodheart-Smithe
7a209cc600
more test fixes
2015-09-23 20:52:57 +01:00
Simon Willnauer
04864dc7d7
Impl SearchSource#hashCode|equals|toString
2015-09-23 21:50:30 +02:00
Simon Willnauer
95a7b6aa83
Add a late-parsing SearchSoruce wrapper for index warmers
2015-09-23 21:31:00 +02:00
Colin Goodheart-Smithe
2de450ca0b
fixes and debugging
2015-09-23 19:57:59 +01:00
Colin Goodheart-Smithe
85f4c39b69
more test fixes
2015-09-23 18:58:16 +01:00
Colin Goodheart-Smithe
63da68e480
test fixes
2015-09-23 18:50:45 +01:00
Colin Goodheart-Smithe
08ae68c195
Merge branch 'feature/query-refactoring' into feature/search-request-refactoring
...
# Conflicts:
# core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java
# core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java
# core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java
# core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java
2015-09-23 18:07:30 +01:00
Colin Goodheart-Smithe
394e551365
removed sysouts
2015-09-23 17:34:28 +01:00
Colin Goodheart-Smithe
52d9664993
fix to sort parsing in SearchService
2015-09-23 17:33:05 +01:00
Colin Goodheart-Smithe
585ed07c5b
unit test fixes
2015-09-23 17:26:18 +01: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
Colin Goodheart-Smithe
2e3cc50a0f
removed sysout
2015-09-23 16:57:25 +01:00
Colin Goodheart-Smithe
d7429a6c63
Search service can now fully populate SearchContext from SearchSourceBuilder
2015-09-23 16:40:58 +01:00
Colin Goodheart-Smithe
a53cf896dc
Parsing of rescuer and sort ByteReferences.
...
Not the neatest implementation in the world. Maybe we should consider changing the builders so it is a single builder for sort and a single builder for rescore instead of a list of builders for each?
2015-09-23 15:43:35 +01:00
Colin Goodheart-Smithe
083f28a704
remove index from QueryParseContext Constructor
2015-09-23 15:07:33 +01:00
Simon Willnauer
6c335f4a47
Parse source, extra-source and template-source on the coordinating node
...
This commit removes all the opaque bytes for extra_source and template_source.
Instead source and extra_source etc. are represented as SearchSourceBuilder which can
in-place be modified and is updated with the content of the request parameters.
Template Source is parsed and evaluated which in-turn replaces the actual source.
2015-09-23 12:24:07 +02:00
Colin Goodheart-Smithe
ac8c1722ac
fix compile errors
2015-09-23 11:07:20 +01:00
Colin Goodheart-Smithe
b98f7cf023
updates to fix some of the NOCOMMITs
2015-09-23 10:44:24 +01:00
Colin Goodheart-Smithe
ab01ec5b28
SearchRequest.source() now returns a SearchSourceBuilder.
...
Lots of NOCOMMITS are in the code as lots of compile errors have been temporarily commented out
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
41e63505b9
muted failing test
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
aa3d29dfbc
small parsing fix for fields
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
b4dd6a5429
fixes to tests
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
3cb3514474
clean up for methods in SearchRequestBuilder so it works with SearchSourceBuilder
2015-09-23 10:44:23 +01:00
Colin Goodheart-Smithe
e1759b1a60
cleanup codebase to work with SearchSourceBuilder
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
9116c1c19f
Renamed SearchSourceBuilder to OldSearchSourceBuilder and NewSearchSourceBuilder to SearchSourceBuilder
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
3c8c6c0250
Completed serialisation to/from son and transport protocol and added a unit test
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
eed6ab7b82
various fixes after a review
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
e73052bce2
cleanup of commented out code
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
5623dd2950
implemented hashCode, equals and fromXContent in NewSearchSourceBuidler
2015-09-23 10:44:22 +01:00
Colin Goodheart-Smithe
a96f14ecc6
new SearchSourceBuilder to use as the search request
2015-09-23 10:44:22 +01: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