diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/utils.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/utils.py index 50da5cdbba4593..0ff3a7f304bdbc 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/utils.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/utils.py @@ -126,6 +126,7 @@ def parse_standard_filters(standard_filters: MetadataFilters = None): f"{filter.key!s} like {parse_filter_value(filter.value, True)}" ) elif filter.operator == FilterOperator.IS_EMPTY: + # in Milvus, array_length(field_name) returns 0 if the field does not exist filters.append(f'array_length({filter.key!s}) == 0') elif filter.operator in [ FilterOperator.EQ,