Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a collapse method to opensearchpy.helpers.search.Search #409

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Conversation

qcoumes
Copy link
Contributor

@qcoumes qcoumes commented Jun 10, 2023

Description

This PR adds a collapse method to opensearchpy.helpers.search.Search which allows adding a collapse requirement to a query without the need of .extra().

This is achieved similarly to how sort() is done.

Issues Resolved

#408

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks good! Add something to the users guide and resolve CHANGELOG conflict?

CHANGELOG.md Outdated Show resolved Hide resolved
@qcoumes
Copy link
Contributor Author

qcoumes commented Jun 22, 2023

I resolved the conflict.

I don't know where I should add some documentation in the user guide. The Using DSL features from opensearch-dsl-py chapter is mainly a redirection to opensearch-dsl-py's documentation.

It seems weird to have a subchapter about collapse without some documentation about basic features.

@dblock
Copy link
Member

dblock commented Jun 26, 2023

It seems weird to have a subchapter about collapse without some documentation about basic features.

Yes, you're of course right. Would love someone (hint hint) to contribute some basic features doc. I'll let it slide for this PR :)

Thank you!

dblock
dblock previously approved these changes Jun 26, 2023
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #409 (d098848) into main (e5789c7) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
+ Coverage   71.66%   71.72%   +0.05%     
==========================================
  Files          77       77              
  Lines        7190     7204      +14     
==========================================
+ Hits         5153     5167      +14     
  Misses       2037     2037              
Impacted Files Coverage Δ
opensearchpy/helpers/search.py 82.07% <100.00%> (+0.67%) ⬆️

Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
@dblock dblock merged commit db972e6 into opensearch-project:main Jun 26, 2023
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.

3 participants