Skip to content

Commit 8b1942d

Browse files
authored
clean-up qdrant_migrator (#2612)
1 parent 318962b commit 8b1942d

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

core/bin/qdrant_migrator.rs

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ enum Commands {
5151
project_id: i64,
5252
data_source_id: String,
5353
},
54-
#[command(arg_required_else_help = true)]
55-
#[command(about = "Ensure indexes on the collection", long_about = None)]
56-
EnsureIndexes {
57-
project_id: i64,
58-
data_source_id: String,
59-
},
6054
}
6155

6256
#[derive(Debug, Parser)]
@@ -470,68 +464,6 @@ fn main() -> Result<()> {
470464
}
471465
));
472466

473-
Ok::<(), anyhow::Error>(())
474-
}
475-
Commands::EnsureIndexes {
476-
project_id,
477-
data_source_id,
478-
} => {
479-
let project = project::Project::new_from_id(project_id);
480-
let ds = match store.load_data_source(&project, &data_source_id).await? {
481-
Some(ds) => ds,
482-
None => Err(anyhow!("Data source not found"))?,
483-
};
484-
485-
let qdrant_client = qdrant_clients.main_client(&ds.config().qdrant_config);
486-
487-
let _ = qdrant_client
488-
.create_field_index(
489-
ds.qdrant_collection(),
490-
"document_id_hash",
491-
qdrant::FieldType::Keyword,
492-
None,
493-
None,
494-
)
495-
.await?;
496-
497-
let _ = qdrant_client
498-
.create_field_index(
499-
ds.qdrant_collection(),
500-
"tags",
501-
qdrant::FieldType::Keyword,
502-
None,
503-
None,
504-
)
505-
.await?;
506-
507-
let _ = qdrant_client
508-
.create_field_index(
509-
ds.qdrant_collection(),
510-
"parents",
511-
qdrant::FieldType::Keyword,
512-
None,
513-
None,
514-
)
515-
.await?;
516-
517-
let _ = qdrant_client
518-
.create_field_index(
519-
ds.qdrant_collection(),
520-
"timestamp",
521-
qdrant::FieldType::Integer,
522-
None,
523-
None,
524-
)
525-
.await?;
526-
527-
utils::done(&format!(
528-
"Created indexes for data source: collection={} cluster={}",
529-
ds.qdrant_collection(),
530-
qdrant_clients
531-
.main_cluster(&ds.config().qdrant_config)
532-
.to_string(),
533-
));
534-
535467
Ok::<(), anyhow::Error>(())
536468
}
537469
}

0 commit comments

Comments
 (0)