-
Notifications
You must be signed in to change notification settings - Fork 43
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
TypeError: Cannot read properties of undefined (reading 'nq') #404
Comments
you need to define functions to enable full text search.
{
name: "sparse",
data_type: DataType.SparseFloatVector,
}
const functions = [
{
name: 'text_bm25_emb',
description: 'bm25 function',
type: FunctionType.BM25,
input_field_names: ['chunk'],
output_field_names: ['sparse'],
params: {},
},
];
client. createCollection({
...otherparams,
functions
})
{
field_name: 'sparse',
index_name: 'sparse',
index_type: 'AUTOINDEX',
metric_type: 'BM25',
}
let r = await client.search({
collection_name,
data: ['工作地点在公司内部'],
anns_field: 'sparse',
limit: 3,
params: { 'drop_ratio_search': 0.2 }
}) |
I will optimize the error handling in the next version, thanks. |
or you can use attu to create the collection and index for you |
This solved my problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug:
TypeError: Cannot read properties of undefined (reading 'nq')
Steps to reproduce:
pnpm i -D tsx
,pnpm i @zilliz/milvus2-sdk-node
main.ts
:tsx main.ts
Milvus-node-sdk version: 2.5.3
Milvus version: 2.5.1
这看起来是sdk的内部错误
The text was updated successfully, but these errors were encountered: