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

Add support for hybrid search with vector distance #1256

Merged
merged 9 commits into from
Aug 27, 2024

Conversation

dirkkul
Copy link
Collaborator

@dirkkul dirkkul commented Aug 23, 2024

search

    objs = collection.query.hybrid(
        "banana",
        vector=vector,
        target_vector=TargetVectors.sum(["first", "second"]),
        max_vector_distance=distance,
    ).objects

aggregate

    res = collection.aggregate.hybrid(
        "banana",
        vector=vector,
        max_vector_distance=distance,
        return_metrics=[wvc.aggregate.Metrics("name").text(count=True)],
    )

@dirkkul dirkkul requested a review from a team as a code owner August 25, 2024 08:25
weaviate/collections/aggregations/hybrid.py Outdated Show resolved Hide resolved
@dirkkul dirkkul merged commit 0051a20 into main Aug 27, 2024
48 of 50 checks passed
@dirkkul dirkkul deleted the hybrid_vector_distance branch August 27, 2024 13:39
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.

2 participants