YACWC
This commit is contained in:
25
milvus_migrate/search_try.py
Normal file
25
milvus_migrate/search_try.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pymilvus import MilvusClient, DataType
|
||||
import numpy as np
|
||||
|
||||
# 1. Set up a Milvus client
|
||||
client = MilvusClient(uri="http://localhost:19530")
|
||||
cname = "nuggets_so400m"
|
||||
ou = client.get_collection_stats(cname)
|
||||
|
||||
import random
|
||||
vec = [random.random() for x in range(1152)]
|
||||
# %%
|
||||
|
||||
from prettyprinter import cpprint
|
||||
vec = random.
|
||||
out = client.search(
|
||||
collection_name=cname,
|
||||
limit = 100,
|
||||
data=[vec],
|
||||
output_fields=["filepath", "frame_number"],
|
||||
filter='(filepath like "%2024/09/20%") or (filepath like "%2024/09/23%")'
|
||||
)
|
||||
|
||||
|
||||
|
||||
cpprint([x['entity']['filepath'] for x in out[0]])
|
||||
Reference in New Issue
Block a user