From 34f90547bd48d4c9c0ec4fa23816c728e6bae827 Mon Sep 17 00:00:00 2001 From: Rune Nielsen Date: Sat, 19 Nov 2022 11:05:47 +0100 Subject: [PATCH] now targets typesense 0.23.1 (#36) --- .circleci/config.yml | 2 +- README.md | 26 +++++++++++++------------- test/typesense/client_test.clj | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dfeea0..2ef3d10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ executors: auth: username: $DOCKER_LOGIN password: $DOCKER_ACCESSTOKEN - - image: typesense/typesense:0.23.0 # For integration testing + - image: typesense/typesense:0.23.1 # For integration testing auth: username: $DOCKER_LOGIN password: $DOCKER_ACCESSTOKEN diff --git a/README.md b/README.md index e185a51..95984d0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Clojars Project](https://img.shields.io/clojars/v/io.github.runeanielsen/typesense-clj.svg)](https://clojars.org/io.github.runeanielsen/typesense-clj) -Clojure client for [Typesense 0.23](https://github.com/typesense/typesense) +Clojure client for [Typesense 0.23.1](https://github.com/typesense/typesense) 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. @@ -22,11 +22,11 @@ Example of settings. ## Collection -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) +This section describes how to use the collection, further information can be found [here.](https://typesense.org/docs/0.23.1/api/collections.html#create-a-collection) ### Create collection -The different `types` for the schema can be found [here](https://typesense.org/docs/0.23.0/api/collections.html#create-a-collection). +The different `types` for the schema can be found [here](https://typesense.org/docs/0.23.1/api/collections.html#create-a-collection). The examples displays the creation of collection named `companies`. @@ -186,7 +186,7 @@ Retrieves the collection on the `collection-name`. ## Documents -This section describes how to use the documents, further information can be found [here.](https://typesense.org/docs/0.23.0/api/documents.html) +This section describes how to use the documents, further information can be found [here.](https://typesense.org/docs/0.23.1/api/documents.html) ### Create document @@ -264,7 +264,7 @@ Update document in a collection on id. The update can be partial. ## Create/Upsert/Update/Delete Documents -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) +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.1/api/documents.html#import-documents) ### Create documents @@ -343,7 +343,7 @@ Export documents in collection. ## Search -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) +Search for documents in a collection. You can find all the query arguments [here.](https://typesense.org/docs/0.23.1/api/documents.html#arguments) ```clojure (search settings "companies" {:q "Innovation" @@ -375,7 +375,7 @@ Search for documents in a collection. You can find all the query arguments [here ## Multi search -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) +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.1/api/documents.html#federated-multi-search) ```clojure (multi-search settings @@ -464,7 +464,7 @@ You can send multiple search requests in a single HTTP request, using the Multi- ## Api keys -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) +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.1/api/api-keys.html#create-an-api-key) ### Create api key @@ -527,7 +527,7 @@ Deletes api key on `id`. ## Curation -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) +Using overrides, you can include or exclude specific documents for a given query, read more [here.](https://typesense.org/docs/0.23.1/api/curation.html) ### Create or update an override @@ -595,7 +595,7 @@ Deletes override on name. ## Collection alias -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) +An alias is a virtual collection name that points to a real collection. Read more [here](https://typesense.org/docs/0.23.1/api/collection-alias.html) ### Create or update alias @@ -643,7 +643,7 @@ Delete alias on collection name. ## Synonyms -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) +The synonyms feature allows you to define search terms that should be considered equivalent, read more [here.](https://typesense.org/docs/0.23.1/api/synonyms.html) ### Create or update synonym @@ -693,7 +693,7 @@ Delete synonym on synonym-name in collection. ### Typesense API Errors -Typesense API exceptions in the [Typesense-api-errors](https://typesense.org/docs/0.23.0/api/api-errors.html) spec. +Typesense API exceptions in the [Typesense-api-errors](https://typesense.org/docs/0.23.1/api/api-errors.html) spec. | Type | Description | |:------------------------------------------|:---------------------------------------------------------------------------| @@ -723,7 +723,7 @@ bin/kaocha unit 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. ```sh -docker run -p 8108:8108 -v/tmp/data:/data typesense/typesense:0.23.0 --data-dir /data --api-key=key +docker run -p 8108:8108 -v/tmp/data:/data typesense/typesense:0.23.1 --data-dir /data --api-key=key ``` The following command runs only the integration tests. diff --git a/test/typesense/client_test.clj b/test/typesense/client_test.clj index 182ab25..ea9737a 100644 --- a/test/typesense/client_test.clj +++ b/test/typesense/client_test.clj @@ -335,7 +335,7 @@ [{:field "company_name" :matched_tokens ["Innovation"] :snippet "Innovationsoft A/S"}] - :text_match 282583051272193}] + :text_match 72341261125681153}] :out_of 1 :page 1 :request_params @@ -379,7 +379,7 @@ [{:field "name" :matched_tokens ["shoe"] :snippet "shoe"}] - :text_match 282583068049665}] + :text_match 72341265420713985}] :out_of 1 :page 1 :request_params @@ -394,7 +394,7 @@ [{:field "name" :matched_tokens ["Nike"] :snippet "Nike"}] - :text_match 282583068049665}] + :text_match 72341265420713985}] :out_of 1 :page 1 :request_params