Bug: `boost` instead of `boosts` in search()
As per elastic app-search api docs, boosts is the correct param.
However in this client, we have boost.
https://github.com/elastic/enterprise-search-python/blob/main/elastic_enterprise_search/_sync/client/app_search.py#L2324
https://github.com/elastic/enterprise-search-python/blob/main/elastic_enterprise_search/_async/client/app_search.py#L2324
and in few other places. This results in the below error.
line 249, in perform_request
raise _HTTP_EXCEPTIONS.get(resp.meta.status, ApiError)(
elastic_enterprise_search.exceptions.BadRequestError: [400] {'errors': ['Options contains invalid key: boost']}
Thanks for reporting this, I believe this is an issue with how the client is generated, I'll get this fixed there and then close this issue afterwards.
@sethmlarson, I have the same issue using the boosts params. Any idea when this can be fixed ? 🙏
Could you confirm using search([...], boosts) will change boosts setting for this query only ? An ad hoc solution I found is to use put_search_settings([...] boosts) but it will change boosts for the whole engine.
Hello, please change https://github.com/elastic/enterprise-search-python/blob/main/elastic_enterprise_search/_sync/client/app_search.py#L2364 to "boosts" and anywhere else you need to. The entire API is borked when trying to use boosts as override to the current Engine settings.
PTAL https://github.com/elastic/enterprise-search-python/pull/174
Fixed in https://github.com/elastic/enterprise-search-python/pull/175 and released in https://pypi.org/project/elastic-enterprise-search/8.10.0/. Thank you for your patience, closing.