weaviate-python-client icon indicating copy to clipboard operation
weaviate-python-client copied to clipboard

Update warning for type mismatches

Open daveatweaviate opened this issue 1 year ago • 0 comments

Code like this

unindexed_response = water_temperatures.aggregate.over_all(
    group_by=GroupByAggregate(prop="location"),
    filters=Filter.by_property("unindexed_temp").greater_or_equal(80),
    return_metrics=Metrics("unindexed_temp").number(median=True, maximum=True, minimum=True),
)

Can return an error because the filter value (80) is type valueInt instead of type valueNumber

Update the current error message to return something more like this:

"The filter input is the wrong type. Property PROP is a NEEDED_TYPE, but the filter value is a INFERRED_TYPE. Update the filter value."

Slack link

daveatweaviate avatar Aug 06 '24 15:08 daveatweaviate