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)
- propagate fastembed local_files_only option for query_points api
- Format error in JSON body: data did not match any variant of untagged enum VectorStruct HOT 8
- using grpc instead of rest giving error HOT 4
- when using grpc instead of rest it gives error i HOT 1
- `http.IntegerIndexParams` is not being converted to `grpc` counterpart HOT 3
- [Proposal] Automatically add Url.port and Url.path to rest_uri when the url parameter is behind a proxy
- Tuple not supported in GRPC payload by Qdrant Client HOT 2
- Discrepancy between /collections/<collection_name> endpoint and GetCollectionInfo from the grpc client HOT 1
- remove rest, async grpc methods and recreate_collection in qdrant-client 1.13.0 HOT 2
- Failed to connect to cloud when running on my local machine but working in google colab. HOT 1
- payload indices with False/None params created via grpc raises an exception on get_collection via http client HOT 1
- Don't write .lock file when loading from an existing collection HOT 1
- UnexpectedResponse: Unexpected Response: 404 (Not Found) on search_points HOT 3
- Ssl handshake failed
- Pydantic missing field error on collection_cluster_info response HOT 6
- Slow batch upload of embeddings generated by fastembed due to `Iterable[ndarray]` conversion to `list[list[float]]` HOT 1
- Add more control over `query_points` method
- Keep Calculation Going if one or few points if not found in `recommend` positive or negative
- `set_payload` in a nested payload HOT 18
- use of np.NINF is removed in numpy 2 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.