-
Notifications
You must be signed in to change notification settings - Fork 106
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
client recreate_collection time out #308
Comments
Hello @lw3259111 |
@joein It is work when I reproduce it locally,and the URL is work |
It seems like problems with the resources (e.g. network) |
Timeout to 60s is still failed. when I use rust is work. rust code is use anyhow::Result;
use qdrant_client::prelude::*;
use qdrant_client::qdrant::vectors_config::Config;
use qdrant_client::qdrant::{
Condition, CreateCollection, Filter, SearchPoints, VectorParams, VectorsConfig,
};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<()> {
// Example of top level client
// You may also use tonic-generated client from `src/qdrant.rs`
let client = QdrantClient::from_url("http://192.168.99.100:6334").build()?;
let collections_list = client.list_collections().await?;
dbg!(collections_list);
// collections_list = ListCollectionsResponse {
// collections: [
// CollectionDescription {
// name: "test",
// },
// ],
// time: 1.78e-6,
// }
let collection_name = "test";
client.delete_collection(collection_name).await?;
client
.create_collection(&CreateCollection {
collection_name: collection_name.into(),
vectors_config: Some(VectorsConfig {
config: Some(Config::Params(VectorParams {
size: 10,
distance: Distance::Cosine.into(),
..Default::default()
})),
}),
..Default::default()
})
.await?;
let collection_info = client.collection_info(collection_name).await?;
dbg!(collection_info);
let payload: Payload = json!(
{
"foo": "Bar",
"bar": 12,
"baz": {
"qux": "quux"
}
}
)
.try_into()
.unwrap();
let points = vec![PointStruct::new(0, vec![12.; 10], payload)];
client
.upsert_points_blocking(collection_name, points, None)
.await?;
let search_result = client
.search_points(&SearchPoints {
collection_name: collection_name.into(),
vector: vec![11.; 10],
filter: Some(Filter::all([Condition::matches("bar", 12)])),
limit: 10,
with_payload: Some(true.into()),
..Default::default()
})
.await?;
dbg!(&search_result);
// search_result = SearchResponse {
// result: [
// ScoredPoint {
// id: Some(
// PointId {
// point_id_options: Some(
// Num(
// 0,
// ),
// ),
// },
// ),
// payload: {
// "bar": Value {
// kind: Some(
// IntegerValue(
// 12,
// ),
// ),
// },
// "foo": Value {
// kind: Some(
// StringValue(
// "Bar",
// ),
// ),
// },
// },
// score: 1.0000001,
// version: 0,
// vectors: None,
// },
// ],
// time: 9.5394e-5,
// }
let found_point = search_result.result.into_iter().next().unwrap();
let mut payload = found_point.payload;
let baz_payload = payload.remove("baz").unwrap().into_json();
println!("baz: {}", baz_payload);
// baz: {"qux":"quux"}
Ok(())
} |
Have you tried to launch python code several times? |
Could you provide some exhaustive information / distinguishable details about your setup? |
I have the same issue. |
@Bannerli hello, could you provide some exhaustive information / distinguishable details about your setup? |
I build qdrant with the follow step:
1. docker pull qdrant/qdrant 2. docker run -p 6333:6333 \ -v $(pwd)/qdrant_storage:/qdrant/storage:z \ qdrant/qdrant
I use qdrant with the follow step:
The error is
![image](https://private-user-images.githubusercontent.com/12690488/269512903-cb10de9e-09ed-435a-9527-2cb6d11f6b45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5NjQwNTIsIm5iZiI6MTcxOTk2Mzc1MiwicGF0aCI6Ii8xMjY5MDQ4OC8yNjk1MTI5MDMtY2IxMGRlOWUtMDllZC00MzVhLTk1MjctMmNiNmQxMWY2YjQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAyVDIzNDIzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5NDM3MDQxZDRkMjUzNTAzYjZiNzI5NzM3MDlmMDVhMTRmNzcxNGNlMzJhNjQxMTZiZTNiYjY0YWNiMjg2NTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JU2RHG_c_Djek7pt27V9abQ_O81NCi--meQnYXrCL9Q)
The text was updated successfully, but these errors were encountered: