Skip to content

Query dsl improvements - #2286

Merged
aafa merged 7 commits into
feature/search-servicefrom
search-service/query-dsl-improvements
Jun 29, 2017
Merged

Query dsl improvements#2286
aafa merged 7 commits into
feature/search-servicefrom
search-service/query-dsl-improvements

Conversation

@kjanosz

@kjanoszkjanosz commented Jun 23, 2017

Copy link
Copy Markdown
Contributor
  • Add bool function to allow arbitrary nesting of the queries
  • Add support for the nested fields
  • Add support for boosting on the context level
  • Add translate endpoint to dump translate query to ES format

I've also refactored ESQueryInterpreter to enforce more purity. More principled way would be to use StateT, but since our input state is mutable (BoolQueryBuilder) there is no reason imho to use state monad and have it modeled as e.g State[BoolQueryBuilder, ()] or State[BoolQueyrBuilder, BoolQueryBuilder].
Also, inside the interpreter I've used the Id monad instead of some real one (like Coeval) to avoid additional allocations, and wrap it only when we actually run it - please see package object of the es package.

@kjanoszkjanosz changed the title Search service/query dsl improvementsQuery dsl improvementsJun 23, 2017
@kjanosz
kjanoszforce-pushed the search-service/query-dsl-improvements branch from 8d7c1e7 to 2b7f749CompareJune 23, 2017 11:12
Allow to specify nested fields in query functions.
Change folding over coproduct.
Remove monad constraint from query interpreter.
Refactor code around.
@kjanosz
kjanoszforce-pushed the search-service/query-dsl-improvements branch from 2b7f749 to 5f7e0e7CompareJune 26, 2017 09:53
@kjanosz
kjanoszforce-pushed the search-service/query-dsl-improvements branch from 9a47c8a to e0f7e2eCompareJune 27, 2017 11:27
Fix bool and raw query functions translation.
Change boost to be set per function type instead of a context.

@aafaaafa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Queries do look fairly advanced now.

@aafa
aafa merged commit 54c553b into feature/search-serviceJun 29, 2017
@aafa
aafa deleted the search-service/query-dsl-improvements branch June 29, 2017 19:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kjanosz@aafa