verify()
This operation validates the input and output fields of a function defined in the CollectionSchema.
Request Syntax
verify(
schema: CollectionSchema
)
PARAMETERS:
schema (CollectionSchema) -
[REQUIRED]
The collection schema whose fields are used to validate the input and output fields of the function.
RETURN TYPE:
None
RETURNS:
None
EXCEPTIONS:
MilvusExceptionThis exception will be raised when any error occurs during this operation.
Example
from pymilvus import MilvusClient, Function, FunctionType
schema = MilvusClient.create_schema()
bm25_function = Function(
name="bm25_fn",
input_field_names=["document_content"],
output_field_names="sparse_vector",
function_type=FunctionType.BM25,
)
schema.add_function(bm25_function)
# Verify the function
bm25_function.verify(schema)