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

Bug: boost instead of boosts in search() #151

Closed
Venkat2811 opened this issue Sep 6, 2022 · 5 comments
Closed

Bug: boost instead of boosts in search() #151

Venkat2811 opened this issue Sep 6, 2022 · 5 comments

Comments

@Venkat2811
Copy link

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']}
@Venkat2811 Venkat2811 changed the title Bug: boost instead of `boosts in search() Bug: boost instead of boosts in search() Sep 6, 2022
@sethmlarson
Copy link
Contributor

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.

@benoit360l
Copy link

benoit360l commented Feb 20, 2023

@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.

@groeney
Copy link

groeney commented Oct 2, 2023

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.

@groeney
Copy link

groeney commented Oct 2, 2023

PTAL #174

@pquentin
Copy link
Member

Fixed in #175 and released in https://pypi.org/project/elastic-enterprise-search/8.10.0/. Thank you for your patience, closing.

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

No branches or pull requests

5 participants