from oasysdb.prelude import *
if __name__ == "__main__":
db = Database("data/example")
config = Config.create_default()
records = Record.many_random(dimension=128, len=100)
collection = Collection.from_records(config, records)
db.save_collection("my_collection", collection)
query = Vector.random(128)
result = collection.search(query, n=5)
print("Nearest neighbors ID: {}".format(result[0].id))