+
Skip to content

Conversation

austin-aryn-ai
Copy link
Contributor

No description provided.

expected = {"p3"}
assert expected == {d.doc_id for d in retrieved_docs}

query_with_filter = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep the old test, it still seems valid. Make a new test test_compound_query.

"must": [actual_query],
"filter": [{"terms": filter}],

if is_compound_query(query):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Per IM discussion, don't do this, instead always wrap -- add a test for the wrapping of a compound query.

https://docs.opensearch.org/docs/latest/query-dsl/compound/index/
says you can have multiple levels "Compound queries serve as wrappers for multiple leaf or compound clauses either to combine their results or to modify their behavior."

@austin-aryn-ai austin-aryn-ai enabled auto-merge (squash) May 29, 2025 21:27
@austin-aryn-ai austin-aryn-ai merged commit 1e3ca99 into main May 29, 2025
12 of 15 checks passed
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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载