Comments (3)
It's almost as if the by_property().equal()
is actually by_property().like()
under the hood. I added another row of data without the string "Verified"
in the status field. Still weaviate returns Not Verified & Verified but it does not print out the new entry.
import weaviate
import weaviate.classes as wvc
from weaviate.classes.config import Property, DataType
client = weaviate.connect_to_local()
# Note that you can use `client.collections.create_from_dict()` to create a collection from a v3-client-style JSON object
client.collections.create(
"Question",
properties=[
Property(name="title", data_type=DataType.TEXT),
Property(name="status", data_type=DataType.TEXT),
]
)
question_collection = client.collections.get("Question")
question_collection.data.insert({"title": "What is the capital of France?", "status": "Verified"})
question_collection.data.insert({"title": "What is the capital of Italy?", "status": "Not Verified"})
question_collection.data.insert({"title": "What is the capital of USA?", "status": "Washington DC"})
verified_questions = question_collection.query.fetch_objects(
filters=wvc.query.Filter.by_property("status").equal("Verified"),
)
for question in verified_questions.objects:
print(question.properties["status"])
"""
Returns:
------------
Verified
Not Verified
"""
from weaviate.
@zbloss : The search is a keyword search where it is looking to match the word 'Verified' in the objects stored in the database and hence you see 2 results "Verified and Not Verified" becuase these objects has keyword "Verified" in it. If you are looking to expect a specific object then I would suggest you to include multiple filters in your search. Let me know, what you think.
from weaviate.
Hey @zbloss 👋
Take a look at the Tokenizationsection in our docs. By default, the fields are tokenized by word, but for your usecase I would recommend tokenizing by field
, which should give you the results you expect
from weaviate.
Related Issues (20)
- WeaviateQueryError when searching for objects stored as a refrence property in a multitenant collection or schema HOT 1
- Support Read-Repairs (and async repair) for deleted objects
- Potential for "half-written" objects if update follows replication inconsistency | Impossible to repair using read-repairs
- Allow tenant sharding
- Add flag to expand search to all available replicas HOT 1
- shard="bwsSXyinFlVm": store is read-only'} HOT 1
- Cosine similarity after subtracting mean vector HOT 1
- API to create free forever Weaviate Cloud sanboxes with tiny limits HOT 3
- Better metrics to investigate "Multi Tenancy Hybrid Search" query latencies
- Bug in dimension tracking logic or underlying LSM bucket when all objects are deleted
- References deduplication via upsert operation
- batch.add_object() returns UUID in spite of import failure when using invalid HF API_KEY HOT 2
- Secure HNSW commit logs with checksums
- Sandbox stuck in 97%, client cannot be made HOT 1
- Backup fails with coordinator: stat: stat /var/lib/weaviate/.../property_<property_name>/secondary: no such file or directory HOT 1
- Weavite - default vectorizer module: no module with name text2vec-ollama HOT 1
- Vulnerability Remediation Required: CVE-2017-3142
- "could not open cloud meta store" error during Weaviate Startup using one node HOT 3
- Nil pointer deref when loading sum-transformers module HOT 2
- Support for gpt-4o and gpt-4o-mini HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weaviate.