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

MB-59616: Adding vector_base64 field #2012

Merged
merged 8 commits into from
Apr 18, 2024
Merged

MB-59616: Adding vector_base64 field #2012

merged 8 commits into from
Apr 18, 2024

Conversation

Likith101
Copy link
Member

  • Added a new field type called vector_base64.
  • Acts similar to vector in most cases.
  • When a new document arrives in the bleve layer, during the parsing of all its fields in processProperty, if the field mapping type is vector-base64, then its value is decoded into a vector field and processed like a vector.
  • The standard golang base64 library is used for the decode operation.

 - Added a new field type called vector_base64.
 - Acts similar to vector in most cases.
 - When a new document arrives in the bleve layer, during
the parsing of all its fields in processProperty, if the
field mapping type is vector-base64, then its value is
decoded into a vector field and processed like a vector.
 - The standard golang base64 library is used for the decode
operation.
 - Added VectorBase64 of type string to the KNNRequest struct
 - ValidateKNN will handle the decoding of the encoded string
and fill the vector field with the vector value
document/field_vector_base64.go Outdated Show resolved Hide resolved
document/field_vector_base64.go Outdated Show resolved Hide resolved
document/field_vector_base64.go Outdated Show resolved Hide resolved
document/field_vector_base64.go Outdated Show resolved Hide resolved
mapping/mapping_vectors.go Outdated Show resolved Hide resolved
search_knn.go Outdated Show resolved Hide resolved
search_knn.go Show resolved Hide resolved
search_knn_test.go Outdated Show resolved Hide resolved
search_knn_test.go Outdated Show resolved Hide resolved
search_knn_test.go Outdated Show resolved Hide resolved
@abhinavdangeti abhinavdangeti added this to the v2.4.1 milestone Apr 10, 2024
document/field_vector_base64.go Outdated Show resolved Hide resolved
document/field_vector_base64.go Show resolved Hide resolved
mapping/mapping_vectors.go Outdated Show resolved Hide resolved
Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Likith101 looking mostly ready. Would you add a benchmark test to here that tests time taken for DecodeVector(..) for a few dimensionalities - maybe 128, 784, 1536.

mapping/mapping_vectors.go Outdated Show resolved Hide resolved
document/field_vector_base64.go Outdated Show resolved Hide resolved
@abhinavdangeti
Copy link
Member

abhinavdangeti commented Apr 16, 2024

@Likith101 faiss_vector_base64_test.go should also get the //go:build vectors treatment :)

@abhinavdangeti
Copy link
Member

abhinavdangeti commented Apr 16, 2024

@Likith101 Did you already run the decode algorithm by Jon?
Would you also update the description above the benchmark test results?

@Likith101
Copy link
Member Author

@Likith101 Did you already run the decode algorithm by Jon? Would you also update the description above the benchmark test results?

I ran the decode algorithm by Jon, so no changes necessary there.

@Likith101
Copy link
Member Author

These are the benchmark results for the decode function done on my local system.

Dimensions Num Runs Per Sec Num Secs Per Op (ns)
128 2184279 541.8
784 410046 2964
1536 212860 5569

@abhinavdangeti abhinavdangeti merged commit 757705e into master Apr 18, 2024
9 checks passed
@abhinavdangeti abhinavdangeti deleted the vectorBase64 branch April 18, 2024 16:06
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

Successfully merging this pull request may close these issues.

3 participants