-
Notifications
You must be signed in to change notification settings - Fork 183
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
[FEATURE] Add a collapse
method to opensearchpy.helpers.search.Search
#408
Comments
I can't see anything of this sort, but just in case I'm missing something, I'll ask: can you think of any case, in which this is implemented, in which we would inadvertently break someone's working code? |
I think the addition of a method and a "private" attribute on |
okay, let's do it! @qcoumes if you want to take a crack at it, go for it. |
I opened a PR: #409 |
Completed in #409 |
Hello, |
I reopened #769. |
Is your feature request related to a problem?
The only way to currently add a collapse requirement to a search body is to use the
extra()
method. This is not the cleanest way because as mentioned in its docstring,extra()
is mostly here for backward compatibility.What solution would you like?
A solution would be to treat it the same way as
sort
:collapse()
methodopensearchpy.helpers.search.Search
which creates and stores thedict
in aself._collapse
attribute.self._collapse
, if defined, in the body of the request in theto_dict()
method.The text was updated successfully, but these errors were encountered: