26 lines
610 B
Python
26 lines
610 B
Python
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]])
|