File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed
docs/advanced/document-store Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ server. Create `docker-compose.yml` as follows:
1818version : ' 3.4'
1919services :
2020 qdrant :
21- image : qdrant/qdrant:v0.5.1
21+ image : qdrant/qdrant:v0.6.0
2222 ports :
2323 - " 6333:6333"
2424 ulimits : # Only required for tests, as there are a lot of collections created
@@ -74,3 +74,47 @@ The following configs can be set:
7474| ` port ` | [ port of the Qdrant server | 6333 |
7575| ` distance ` | Distance metric to be used during search. Can be 'cosine', 'dot' or 'euclidean' | 'cosine' |
7676| ` scroll_batch_size ` | batch size used when scrolling over the storage | 64 |
77+
78+ ## Minimum example
79+
80+ Create ` docker-compose.yml ` :
81+
82+ ``` yaml
83+ ---
84+ version : ' 3.4'
85+ services :
86+ qdrant :
87+ image : qdrant/qdrant:v0.6.0
88+ ports :
89+ - " 6333:6333"
90+ ulimits : # Only required for tests, as there are a lot of collections created
91+ nofile :
92+ soft : 65535
93+ hard : 65535
94+ ...
95+ ```
96+
97+ ``` bash
98+ pip install -U docarray[qdrant]
99+ docker compose up
100+ ```
101+
102+
103+ ``` python
104+ import numpy as np
105+
106+ from docarray import DocumentArray
107+
108+ N, D = 100 , 128
109+
110+ da = DocumentArray.empty(N, storage = ' qdrant' , config = {' n_dim' : D}) # init
111+
112+ da.embeddings = np.random.random([N, D])
113+
114+ print (da.find(np.random.random(D), limit = 10 ))
115+ ```
116+
117+
118+ ``` bash
119+ < DocumentArray (length=10) at 4917906896>
120+ ```
You can’t perform that action at this time.
0 commit comments