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

feat: support Vector Search #896

Merged
merged 59 commits into from Apr 2, 2024
Merged

Conversation

pl04351820
Copy link
Contributor

@pl04351820 pl04351820 commented Mar 25, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

This is new vector search feature support for Firestore:

  • Support vector data type
    • Reordering the vector data type in SDK to be consistent with server.
    • Auto covert data type from int to double if it is a vector type.
  • Support FindNearest for Query/Collection/CollectionGroup.
    • Support distance measurement with EUCLIDEAN/COSINE/DOT_PRODUCT.
    • Support pre-filter with equality condition.

Testing:

  • Unit and System tests coverage on vector data and vector query.
  • A util script to bootstrap vector index for system tests.

Future Work: Async vector search support and error handling with retry will come in follow-up PR

@pl04351820 pl04351820 requested review from a team as code owners March 25, 2024 21:27
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: firestore Issues related to the googleapis/python-firestore API. labels Mar 25, 2024
@daniel-sanche daniel-sanche added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Apr 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 2, 2024
Copy link
Contributor

@parthea parthea left a comment

Choose a reason for hiding this comment

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

LGTM but waiting to formally approve until we determine if there is a breaking change

google/cloud/firestore_v1/vector.py Outdated Show resolved Hide resolved
google/cloud/firestore_v1/order.py Outdated Show resolved Hide resolved
tests/unit/v1/test_vector.py Outdated Show resolved Hide resolved
@daniel-sanche daniel-sanche added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Apr 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 2, 2024
@daniel-sanche daniel-sanche added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Apr 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 2, 2024
@daniel-sanche daniel-sanche merged commit 08fcaaf into googleapis:main Apr 2, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants