Skip to content

Commit

Permalink
add comment about milvus array_length behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusAntons committed Oct 2, 2024
1 parent f30ae3a commit 21cdf7a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 21cdf7a

Please sign in to comment.