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] dense_vector instead of knn_vector #437

Closed
rogeriochaves opened this issue Apr 7, 2023 · 4 comments
Closed

[BUG] dense_vector instead of knn_vector #437

rogeriochaves opened this issue Apr 7, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@rogeriochaves
Copy link

What is the bug?

The index builder has the dense_vector property (https://www.javadoc.io/doc/org.opensearch.client/opensearch-java/latest/org/opensearch/client/opensearch/_types/mapping/DenseVectorProperty.html), but dense_vector doesn't actually exists on OpenSearch, only on ES, if I try to use it, I get a 400.

On OpenSearch, it should actually be knn_vector, as it was decided on this RFC (opensearch-project/OpenSearch#3545), but this option is not available

How can one reproduce the bug?

Kotlin code:

        builder
            .properties(indexedProductSemanticVectorKey) { p ->
                p.denseVector(
                    DenseVectorProperty.of { d ->
                        d.dims(1536)
                    }
                )
            }

What is the expected behavior?

To have a knn option available, or that the denseVector one just works

What is your host/environment?

AWS

@rogeriochaves rogeriochaves added bug Something isn't working untriaged labels Apr 7, 2023
@wbeckler
Copy link

wbeckler commented Apr 7, 2023

good catch. Feel free to PR a fix.

@wbeckler wbeckler removed the untriaged label Apr 7, 2023
@wisocn
Copy link

wisocn commented Jun 1, 2023

Bumping this for visibility - got the same exact issue today

@maltehedderich
Copy link
Contributor

maltehedderich commented Jun 8, 2023

I am going to start working on this issue now.

Should I also remove the dense vector property and therefore introduce some incompatibility with ES or just add the knn_vector property and index settings?

All property files are prefixed with THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. but I could not find any reference to the generator for this. Is the comment outdated or where can I find the generator?

@rogeriochaves
Copy link
Author

this worked well for us in the new version of the lib, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants