Skip to content

Translate search bodies that have no query - #161

Merged
serhiy-bzhezytskyy merged 1 commit into
apache:mainfrom
serhiy-bzhezytskyy:convert-search-bodies-without-query
Nov 25, 2026
Merged

serhiy-bzhezytskyy merged 1 commit into
apache:mainfrom
serhiy-bzhezytskyy:convert-search-bodies-without-query

Conversation

@serhiy-bzhezytskyy

Copy link
Copy Markdown
Contributor

Fixes #160.

A search body with only aggs or only size was copied into the converted workload in OpenSearch DSL. It is now translated whenever its query is absent or an object; a query that is already a string is left alone.

Converting geonames now gives the committed operations for country_agg_* and numeric-term-cardinality-agg-high (the two country_* gain an explicit limit: 10, the default), and the three agree with OpenSearch on a 1M-document sample. Operations whose body has a query are not touched. The new tests fail without the change.

A body with only aggs, or only size, was copied into the converted workload in OpenSearch DSL, which
Solr rejects. Translate every body whose query is absent or an object, and leave a query that is already
a Solr string alone.
@serhiy-bzhezytskyy
serhiy-bzhezytskyy merged commit 1b40f8c into apache:main Nov 25, 2026
4 checks passed
serhiy-bzhezytskyy added a commit to serhiy-bzhezytskyy/solr-orbit that referenced this pull request Nov 26, 2026
Keep both sides of the tests file: the date_histogram test classes of this branch and the
test class for search bodies without a query from apache#161.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: convert-workload leaves a search body without "query" in OpenSearch DSL

2 participants