Skip to content

Search query builder formatter

Madelein van Niekerk requested to merge 461872-add-size-and-fields into master

What does this MR do and why?

Adds a format class which has two methods currently:

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Compare the queries between the class proxy and query builder to see they're the same:

Search::Elastic::IssueQueryBuilder.build(query: '*')

is the same as

Issue.__elasticsearch__.elastic_search('*').search.definition[:body]

With count_only: true:

Search::Elastic::IssueQueryBuilder.build(query: '*', options: {count_only: true})

is the same as

Issue.__elasticsearch__.elastic_search('*', options: {count_only: true}).search.definition[:body]

Related to #461872 (closed)

Edited by Madelein van Niekerk

Merge request reports