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

[v2][search]--Suffix matching is not supported,failed to create query plan: cannot parse expression: fieldVarchar like "%0" #768

Closed
yongpengli-z opened this issue Feb 22, 2024 · 0 comments
Assignees

Comments

@yongpengli-z
Copy link
Collaborator

pymilvus support suffix pattern match。
pymilvus:

>>> result = milvus_client.search("test_search_collection_binbin_tmp_000", vectors_to_search, limit=3, filter="string like '%0'")
>>> result
[[{'id': 1550, 'distance': 16.178424835205078, 'entity': {}}, {'id': 1240, 'distance': 16.278823852539062, 'entity': {}}, {'id': 380, 'distance': 16.668149948120117, 'entity': {}}]]

java-sdk-V2

@Test(description = "search",groups = {"Smoke"},dataProvider = "filterAndExcept")
    public void search(String filter,int expect){
        int topK=10;
        SearchResp search = milvusClientV2.search(SearchReq.builder()
                .collectionName(CommonData.defaultFloatVectorCollection)
                .filter("fieldVarchar like \"%0\" ")
                .outputFields(Lists.newArrayList("*"))
                .consistencyLevel(ConsistencyLevel.STRONG)
                .vectorFieldName(CommonData.fieldFloatVector)
                .data(GenerateUtil.generateFloatVector(10,3,CommonData.dim))
                .topK(topK)
                .build());
        System.out.println(search);
        Assert.assertEquals(search.getSearchResults().size(),expect);
    }

image

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

No branches or pull requests

2 participants