Skip to content

[QUESTION]: Why the TextMatch search don´t work in my project #2675

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

Open
1 task done
GBrochado opened this issue Feb 28, 2025 · 0 comments
Open
1 task done

[QUESTION]: Why the TextMatch search don´t work in my project #2675

GBrochado opened this issue Feb 28, 2025 · 0 comments
Labels
kind/question A question to answer

Comments

@GBrochado
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What is your question?

I add to my project in Milvus search a filter with "TEXT_MATCH(page,content, '{word}')" for word in key
But when I try to search for a specific word returns entites that dont have the word.

# Define search parameters
search_params = {"metric_type": "COSINE", "params": {"nprobe": 50}}
top_k = 20

# Define filter parameters
key = get_keywords(query_text)
filter_parms = " or ".join([f"TEXT_MATCH(page_content, '{word}')" for word in key])
print(filter_parms)

return collection.search(
    data=query_embedding,
    anns_field="embeddings",
    #partition_names=[particion_post_name,particion_opi_name],
    partition_names=[particion_post_name],
    filter=filter_parms,
    param=search_params,
    limit=top_k,
    output_fields=["metadata", "page_content"],
)

Anything else?

No response

@GBrochado GBrochado added the kind/question A question to answer label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question A question to answer
Projects
None yet
Development

No branches or pull requests

1 participant