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)
- Request for Korean Language Tokenization Support (e.g. using Spacy Tokenizer)
- Greater or equal filter on date does not work as expected: Is a Date represented as a 32 bit integer? HOT 1
- Highlight/return specific property values satisfying filters
- Multi-target vector search HOT 3
- 3 node cluster issues HOT 2
- Add option to include HNSW cache prefilling in shard ready status HOT 1
- Objects batcher create object has different behavior with Weaviate 1.25.2 vs 1.24.19
- Add intfloat/multilingual-e5-large to text2vec-transformers pre-built image
- Query index with batch of queries
- GPT-4o vectorizer
- invalid character 'p' after top-level value, HOT 3
- Proposal: Integration of Anthropic Models into Weaviate HOT 1
- node metadata string values are parsed as json HOT 1
- [CRITICAL] LSM objects may become corrupted from accidentally initializing bucket multiple times
- Backup gets stuck and Weaviate as well HOT 1
- Cannot uncheck auto schema generation on WCS managed cluster HOT 2
- Ability to change the reranker at runtime/after creating a collection
- Add metrics for batch sizes HOT 1
- Need API for LLM prompts without making a query
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.