Open Mdelaf opened 3 months ago
Hello @Mdelaf, thank you for reporting this issue; would you be interested in contributing a fix, please?
@Mdelaf In case you don't want to work on the fix, I would be happy to pitch in and contribute to the fix. Please let us know if you are working on the fix.
Hello @saimedhi @Mdelaf hasn't replied. I already waited a week now for @Mdelaf. Do you mind if I go ahead and raise PR for the fix?
Hello @saimedhi @Mdelaf hasn't replied. I already waited a week now for @Mdelaf. Do you mind if I go ahead and raise PR for the fix?
@imvtsl Please feel free to raise PR with fix. Thank you.
Thanks @saimedhi . I will raise a PR with fix.
I raised this PR for the fix. @Mdelaf was right in his analysis that collapse property is not copied in the clone method.
Resolved by PR #771
Hello, Not sure whether we should reopen this, but we switched to AsyncOpensearch and AsyncSearch helper. It lacks support for collapse althogether: https://github.com/opensearch-project/opensearch-py/blob/main/opensearchpy/_async/helpers/search.py
Yes, https://github.com/opensearch-project/opensearch-py/pull/771/files should have had async support too :( Care to contribute?
What is the bug?
Chain operations over a
Search
object do not preserve the_collapse
attribute.How can one reproduce the bug?
What is the expected behavior?
The
_collapse
property should be preserved when chaining additional methods after to the Search object.What is your host/environment?
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux OpenSearch 2.6.0
Do you have any screenshots?
Not needed.
Do you have any additional context?
I think this bug was introduced during the implementation of collapse, because the
_collapse
property is not copied in the_clone
method.