Comments (8)
@geetu040 unfortunately, your answer is confusing, could you correct it please?
from qdrant-client.
query_text
param is not working for qdrant_client.search
because you are using the wronge method here. Instead you should use qdrant_client.query
that accepts query_text
param
So, instead of this
qdrant_client.search(collection_name="my_collection", query_text="my_text")
You code should look like this
qdrant_client.query(collection_name="my_collection", query_text="my_text")
Source Code Explanation
If you want to look into the source code then this explanation is for you
The class QdrantClient
inherits the class QdrantFastembedMixin
qdrant_client/qdrant_client.py
class QdrantClient(QdrantFastembedMixin):
...
And the class QdrantFastembedMixin
implements the query
method you are looking for
qdrant_client/qdrant_fastembed.py
class QdrantFastembedMixin(QdrantBase):
...
def query(
self,
collection_name: str,
query_text: str,
query_filter: Optional[models.Filter] = None,
limit: int = 10,
**kwargs: Any,
) -> List[QueryResponse]:
...
I hope this clears your concern, let me know if I am not being clear
from qdrant-client.
you are looking for another method - query
, and it indeed accepts query_text
from qdrant-client.
QdrantClient inherits methods from QdrantFastembedMixin so you should use qdrant_client.search method instead
qdrant_client.search(collection_name="my_collection", query_text="my_text")
If you go through the source code you should find the method here
https://github.com/qdrant/qdrant-client/blob/master/qdrant_client/qdrant_fastembed.py#L325
from qdrant-client.
@geetu040 how am I supposed to change the code? Thanks for help
from qdrant-client.
Thanks a lot @geetu040. At this point I am afraid the readme is misleading.
from qdrant-client.
@giacomobartoli I briefly checked readme and could not find a mistake :(
Could you please point to the exact statement in readme which is incorrect?
from qdrant-client.
My bad. Readme is correct. You can close this issue.
from qdrant-client.
Related Issues (20)
- Missing import statement in documentation (Get Started) HOT 2
- Local Qdrant db Error on loading: KeyError: '__pydantic_fields_set__' HOT 4
- Upgrade fastembed version from 0.1.1 to 0.2.1 (latest) HOT 3
- Deleting points by ID not working HOT 3
- Trigger nighly tests against latest qdrant dev build
- Tracking issue: local mode for Qdrant v1.8 HOT 3
- Feature Request: Progress bar for batch upload_points function HOT 2
- Check vectors for NaN in local mode HOT 2
- qdrant_client.get_fastembed_vector_params() with upload_collection HOT 4
- Python Application Crashes on Attempting to Retrieve Non-existent Collection via QdrantClient in GRPC Mode HOT 2
- Add note about batching into README.md HOT 1
- grpc.PointStruct.PayloadEntry errror HOT 2
- How to upload collection asynchronous HOT 2
- Feature Request: Add ability to have properties/metadata for a collection
- qdrant_client.QdrantClient never returns HOT 1
- Datetime timezone parsing inconsistency HOT 1
- investigate local mode close HOT 1
- client method to recover from snapshots
- Make httpx client aware of timeouts passed to methods HOT 2
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 qdrant-client.