You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After obtaining Vec using search, how can I get the specific data of each field, for example, the specific values of the fields?
Expected Behavior
After obtaining Vec using search, how can I directly access the specific values of the fields without using match?
Steps/Code To Reproduce behavior
let nomic = OllamaEmbedder::default().with_model("nomic-embed-text");
let vec_content:Vec<f32> = nomic.embed_query(msg).await?.into_iter().map(|x|x as f32).collect();
let collection = client.get_collection("T1").await?;
let result:Vec<SearchResult> = collection.search(vec![Value::FloatArray(Cow::from(vec_content))],"vec2".to_string(),3,MetricType::L2,vec!["pid","content"], &SearchOption::new()).await?;
let j = result.first().unwrap();
for idx in 0..j.size {
let pids = &j.field.get(0).unwrap().get(idx as usize).unwrap();
match pids {
Value::Long(j) => {
println!("{}", j);
},
_ => {}
}
}
Environment details
- Milvus version (v2.3.14):
Anything else?
no
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
After obtaining Vec using search, how can I get the specific data of each field, for example, the specific values of the fields?
Expected Behavior
After obtaining Vec using search, how can I directly access the specific values of the fields without using match?
Steps/Code To Reproduce behavior
Environment details
- Milvus version (v2.3.14):
Anything else?
no
The text was updated successfully, but these errors were encountered: