elasticsearch-dsl-py icon indicating copy to clipboard operation
elasticsearch-dsl-py copied to clipboard

Feature Request: Pass parameters to FacetedSearch

Open MichZipp opened this issue 2 years ago • 0 comments

The Search object allows us to pass parameters such as the "request_timeout". However, we cannot pass parameters to the FacetedSearch. Therefore, large requests will time out quickly.

We could easily integrate this feature by adding the following lines:

class FacetedSearch(object):
    ...
    params = None
    ...

   def search(self):
        s = Search(doc_type=self.doc_types, index=self.index, using=self.using).params(**self.params)
        return s.response_class(FacetedResponse)
   ...

I'm happy to do the changes and submit a pull request.

MichZipp avatar Oct 04 '22 21:10 MichZipp