You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clojure client for [Typesense 0.22](https://github.com/typesense/typesense)
5
+
Clojure client for [Typesense 0.23](https://github.com/typesense/typesense)
6
6
7
7
All of the examples uses the `typesense.client` namespace. The examples shows the simplest way to get started using the client, but all parameters described on Typesense API documentation should work, if that is not the case, please make a pull-request or open an issue.
8
8
@@ -22,11 +22,11 @@ Example of settings.
22
22
23
23
## Collection
24
24
25
-
This section describes how to use the collection, further information can be found [here.](https://typesense.org/docs/0.22.2/api/collections.html#create-a-collection)
25
+
This section describes how to use the collection, further information can be found [here.](https://typesense.org/docs/0.23.0/api/collections.html#create-a-collection)
26
26
27
27
### Create collection
28
28
29
-
The different `types` for the schema can be found [here](https://typesense.org/docs/0.22.2/api/collections.html#create-a-collection).
29
+
The different `types` for the schema can be found [here](https://typesense.org/docs/0.23.0/api/collections.html#create-a-collection).
30
30
31
31
The examples displays the creation of collection named `companies`.
32
32
@@ -42,25 +42,33 @@ The examples displays the creation of collection named `companies`.
42
42
:default_sorting_field"num_employees"})
43
43
44
44
;; Example success response =>
45
-
{:created_at1647252992
46
-
:default_sorting_field"num_employees"
45
+
{:default_sorting_field"num_employees"
47
46
:fields [{:facetfalse
48
47
:indextrue
49
48
:name"company_name"
50
49
:optionalfalse
51
-
:type"string"}
50
+
:type"string"
51
+
:infixfalse
52
+
:locale""
53
+
:sortfalse}
52
54
{:facetfalse
53
55
:indextrue
54
56
:name"num_employees"
55
57
:optionalfalse
56
-
:type"int32"}
58
+
:type"int32"
59
+
:infixfalse
60
+
:locale""
61
+
:sorttrue}
57
62
{:facettrue
58
63
:indextrue
59
64
:name"country"
60
65
:optionalfalse
61
-
:type"string"}]
62
-
:name"companies"
63
-
:num_documents0
66
+
:type"string"
67
+
:infixfalse
68
+
:locale""
69
+
:sortfalse}]
70
+
:name"companies_collection_test"
71
+
:num_documents0
64
72
:symbols_to_index []
65
73
:token_separators []}
66
74
```
@@ -106,26 +114,35 @@ Returns a summary of all your collections. The collections are returned sorted b
106
114
(list-collections settings)
107
115
108
116
;; Example success response =>
109
-
[{:default_sorting_field"num_employees"
110
-
:fields [{:facetfalse
111
-
:indextrue
112
-
:name"company_name"
113
-
:optionalfalse
114
-
:type"string"}
115
-
{:facetfalse
116
-
:indextrue
117
-
:name"num_employees"
118
-
:optionalfalse
119
-
:type"int32"}
120
-
{:facettrue
121
-
:indextrue
122
-
:name"country"
123
-
:optionalfalse
124
-
:type"string"}]
125
-
:name"companies_collection_test"
126
-
:num_documents0
127
-
:symbols_to_index []
128
-
:token_separators []}]
117
+
{:default_sorting_field"num_employees"
118
+
:fields [{:facetfalse
119
+
:indextrue
120
+
:name"company_name"
121
+
:optionalfalse
122
+
:type"string"
123
+
:infixfalse
124
+
:locale""
125
+
:sortfalse}
126
+
{:facetfalse
127
+
:indextrue
128
+
:name"num_employees"
129
+
:optionalfalse
130
+
:type"int32"
131
+
:infixfalse
132
+
:locale""
133
+
:sorttrue}
134
+
{:facettrue
135
+
:indextrue
136
+
:name"country"
137
+
:optionalfalse
138
+
:type"string"
139
+
:infixfalse
140
+
:locale""
141
+
:sortfalse}]
142
+
:name"companies_collection_test"
143
+
:num_documents0
144
+
:symbols_to_index []
145
+
:token_separators []}
129
146
```
130
147
131
148
### Retrieve collection
@@ -137,31 +154,39 @@ Retrieves the collection on the `collection-name`.
137
154
138
155
;; Example success response =>
139
156
{:default_sorting_field"num_employees"
140
-
:fields
141
-
[{:facetfalse
142
-
:indextrue
143
-
:name"company_name"
144
-
:optionalfalse
145
-
:type"string"}
146
-
{:facetfalse
147
-
:indextrue
148
-
:name"num_employees"
149
-
:optionalfalse
150
-
:type"int32"}
151
-
{:facettrue
152
-
:indextrue
153
-
:name"country"
154
-
:optionalfalse
155
-
:type"string"}]
156
-
:name"companies"
157
+
:fields [{:facetfalse
158
+
:indextrue
159
+
:infixfalse
160
+
:locale""
161
+
:name"company_name"
162
+
:optionalfalse
163
+
:sortfalse
164
+
:type"string"}
165
+
{:facetfalse
166
+
:indextrue
167
+
:infixfalse
168
+
:locale""
169
+
:name"num_employees"
170
+
:optionalfalse
171
+
:sorttrue
172
+
:type"int32"}
173
+
{:facettrue
174
+
:indextrue
175
+
:infixfalse
176
+
:locale""
177
+
:name"country"
178
+
:optionalfalse
179
+
:sortfalse
180
+
:type"string"}]
181
+
:name"companies_collection_test"
157
182
:num_documents0
158
183
:symbols_to_index []
159
184
:token_separators []}
160
185
```
161
186
162
187
## Documents
163
188
164
-
This section describes how to use the documents, further information can be found [here.](https://typesense.org/docs/0.22.2/api/documents.html)
189
+
This section describes how to use the documents, further information can be found [here.](https://typesense.org/docs/0.23.0/api/documents.html)
165
190
166
191
### Create document
167
192
@@ -239,7 +264,7 @@ Update document in a collection on id. The update can be partial.
239
264
240
265
## Create/Upsert/Update/Delete Documents
241
266
242
-
Create/upsert/update documents. All of them takes optional parameters, an example is setting the batch size using `:batch_size 20`. Read more [here.](https://typesense.org/docs/0.22.2/api/documents.html#import-documents)
267
+
Create/upsert/update documents. All of them takes optional parameters, an example is setting the batch size using `:batch_size 20`. Read more [here.](https://typesense.org/docs/0.23.0/api/documents.html#import-documents)
243
268
244
269
### Create documents
245
270
@@ -318,7 +343,7 @@ Export documents in collection.
318
343
319
344
## Search
320
345
321
-
Search for documents in a collection. You can find all the query arguments [here.](https://typesense.org/docs/0.22.2/api/documents.html#arguments)
346
+
Search for documents in a collection. You can find all the query arguments [here.](https://typesense.org/docs/0.23.0/api/documents.html#arguments)
322
347
323
348
```clojure
324
349
(search settings "companies" {:q"Innovation"
@@ -350,7 +375,7 @@ Search for documents in a collection. You can find all the query arguments [here
350
375
351
376
## Multi search
352
377
353
-
You can send multiple search requests in a single HTTP request, using the Multi-Search feature. This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. You can read more about multi-search [here.](https://typesense.org/docs/0.22.2/api/documents.html#federated-multi-search)
378
+
You can send multiple search requests in a single HTTP request, using the Multi-Search feature. This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. You can read more about multi-search [here.](https://typesense.org/docs/0.23.0/api/documents.html#federated-multi-search)
354
379
355
380
```clojure
356
381
(multi-search settings
@@ -439,7 +464,7 @@ You can send multiple search requests in a single HTTP request, using the Multi-
439
464
440
465
## Api keys
441
466
442
-
Typesense allows you to create API Keys with fine-grain access control. You can restrict access on both a per-collection and per-action level, [read more here](https://typesense.org/docs/0.22.2/api/api-keys.html#create-an-api-key)
467
+
Typesense allows you to create API Keys with fine-grain access control. You can restrict access on both a per-collection and per-action level, [read more here](https://typesense.org/docs/0.23.0/api/api-keys.html#create-an-api-key)
443
468
444
469
### Create api key
445
470
@@ -502,7 +527,7 @@ Deletes api key on `id`.
502
527
503
528
## Curation
504
529
505
-
Using overrides, you can include or exclude specific documents for a given query, read more [here.](https://typesense.org/docs/0.22.2/api/curation.html)
530
+
Using overrides, you can include or exclude specific documents for a given query, read more [here.](https://typesense.org/docs/0.23.0/api/curation.html)
An alias is a virtual collection name that points to a real collection. Read more [here](https://typesense.org/docs/0.22.2/api/collection-alias.html)
598
+
An alias is a virtual collection name that points to a real collection. Read more [here](https://typesense.org/docs/0.23.0/api/collection-alias.html)
570
599
571
600
### Create or update alias
572
601
@@ -614,7 +643,7 @@ Delete alias on collection name.
614
643
615
644
## Synonyms
616
645
617
-
The synonyms feature allows you to define search terms that should be considered equivalent, read more [here.](https://typesense.org/docs/0.22.2/api/synonyms.html)
646
+
The synonyms feature allows you to define search terms that should be considered equivalent, read more [here.](https://typesense.org/docs/0.23.0/api/synonyms.html)
618
647
619
648
### Create or update synonym
620
649
@@ -664,7 +693,7 @@ Delete synonym on synonym-name in collection.
664
693
665
694
### Typesense API Errors
666
695
667
-
Typesense API exceptions in the [Typesense-api-errors](https://typesense.org/docs/0.22.2/api/api-errors.html) spec.
696
+
Typesense API exceptions in the [Typesense-api-errors](https://typesense.org/docs/0.23.0/api/api-errors.html) spec.
To run the integration tests you can run a local docker instance with the following command. This will start a instance of Typesense on `localhost:8108`. The Typesense instance will be cleaned before starting the integration tests.
695
724
696
725
```sh
697
-
docker run -p 8108:8108 -v/tmp/data:/data typesense/typesense:0.22.2 --data-dir /data --api-key=key
726
+
docker run -p 8108:8108 -v/tmp/data:/data typesense/typesense:0.23.0 --data-dir /data --api-key=key
698
727
```
699
728
700
729
The following command runs only the integration tests.
0 commit comments