Skip to content

rank_window_size instead of window_size is failing #2883

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

Closed
mariaapostigo opened this issue Apr 4, 2025 · 1 comment
Closed

rank_window_size instead of window_size is failing #2883

mariaapostigo opened this issue Apr 4, 2025 · 1 comment

Comments

@mariaapostigo
Copy link

When using AsyncDenseVectorStrategy(hybrid=True, rrf={"rank_constant": 40, "window_size": 30}) from elasticsearch/helpers/vectorstore/_async/strategies.py I am getting the following error:

BadRequestError(400, 'x_content_parse_exception', '[1:21990] [rrf] unknown field [rank_window_size] did you mean [window_size]?')

I have a docker with elasticsearch 8.14 and my elasticsearch-py is 8.17.1

What is going on with the compatibilities?

@pquentin
Copy link
Member

pquentin commented Apr 4, 2025

Hello, as noted in the README's compatibility section, language clients are forward-compatible, meaning that elasticsearch-py 8.17.1 can talk to Elasticsearch 8.17.0 or greater. We can't guarantee backward compatibility, especially for technical preview features, which is the case of RRF in Elasticsearch 8.14.

window_size was renamed to rank_window_size in Elasticearch 8.15 and RRF became generally available in Elasticsearch 8.17. To accommodate this, the choice we made in elasticsearch-py 8.16 and above is to automatically rename window_size to rank_window_size, see #2666 for more details. Additionally, starting with elasticsearch-py 8.16, we emit Python warnings for usage of tech preview APIs.

I would suggest upgrading Elasticsearch to 8.17. Downgrading elasticsearch-py to 8.14 is possible too, but you would miss on tons of improvements made to Elasticsearch regarding vector search in the past year, and this could cause issues with dependencies like LangChain if you use those.

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

2 participants