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

Support range search #60

Closed
roji opened this issue Feb 27, 2024 · 1 comment · Fixed by #66
Closed

Support range search #60

roji opened this issue Feb 27, 2024 · 1 comment · Fixed by #66

Comments

@roji
Copy link
Collaborator

roji commented Feb 27, 2024

https://milvus.io/docs/within_range.md#Conduct-a-Range-Search

@roji roji added the enhancement New feature or request label Feb 27, 2024
@roji roji added this to the 2.3.0 milestone Feb 27, 2024
@roji roji self-assigned this Mar 12, 2024
roji added a commit to roji/milvus-sdk-csharp that referenced this issue Mar 12, 2024
@roji roji removed this from the 2.3.0 milestone Mar 12, 2024
@roji roji removed the enhancement New feature or request label Mar 12, 2024
@roji roji removed their assignment Mar 12, 2024
@roji
Copy link
Collaborator Author

roji commented Mar 12, 2024

The radius and range_filter parameters which make up range search turned out to be simple "extra parameters", so they don't require any new API:

[Fact]
public async Task Search_with_range_search()
{
    var results = await Collection.SearchAsync(
        "float_vector",
        new ReadOnlyMemory<float>[] { new[] { 0.1f, 0.2f } },
        SimilarityMetricType.L2,
        limit: 5,
        new()
        {
            ExtraParameters =
            {
                { "radius", "60" },
                { "range_filter", "10" }
            }
        });

    Assert.Collection(
        results.Ids.LongIds!.Order(),
        id => Assert.Equal(2, id),
        id => Assert.Equal(3, id));
}

Added a test for in #66.

@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
@roji roji closed this as completed in #66 Mar 12, 2024
roji added a commit that referenced this issue Mar 12, 2024
@roji roji mentioned this issue Mar 12, 2024
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 a pull request may close this issue.

1 participant