Description
Filtering by equal on a text property seems to result in a “contains” filter instead.
Example:
from weaviate.classes.query import Filter
from weaviate.connect import ConnectionParams
from weaviate import WeaviateClient
weaviate_client = WeaviateClient(
connection_params=ConnectionParams.from_url(
os.getenv("WEAVIATE_SERVER_URL","http://localhost:8080"),
int(os.getenv("WEAVIATE_SERVER_GRPC_PORT", 50051))
))
col = weaviate_client.collections.use(index)
response = col.query.fetch_objects(filters=Filter.by_property(“drillDiameter”).equal(“2 mm”),limit=3)
for o in response.objects:
print(o.properties[‘drillDiameter’])
outputs:
2,4 mm
2,1 mm
5,2 mm
Server Setup Information
- Weaviate Server Version: 1.30.2
- Deployment Method: local Docker run semitechnologies/weaviate:1.30.2
- Multi Node? Number of Running Nodes: default settings
- Client Language and Version: weaviate-client 4.16.10 (python, poetry-installed)
- Multitenancy?: default settings
Is this a known bug or may it be related to my specific test case or setup? I couldn’t find anything about this yet, any help would be much appreciated.