From 168bdfcdcffea9d5ddbe51dc9d8270660a11aef8 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 29 Jan 2025 10:03:27 +0100 Subject: [PATCH 1/4] guides: update the snippets according to the doc review --- tests/CTS/requests/search/setSettings.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/CTS/requests/search/setSettings.json b/tests/CTS/requests/search/setSettings.json index 65eccfc8b7..9861e1bad8 100644 --- a/tests/CTS/requests/search/setSettings.json +++ b/tests/CTS/requests/search/setSettings.json @@ -788,6 +788,26 @@ } } }, + { + "testName": "create replica index articles", + "parameters": { + "indexName": "theIndexName", + "indexSettings": { + "replicas": [ + "articles_date_desc" + ] + } + }, + "request": { + "path": "/1/indexes/theIndexName/settings", + "method": "PUT", + "body": { + "replicas": [ + "articles_date_desc" + ] + } + } + }, { "testName": "create virtual replica index", "parameters": { From deea2cdf0af418e743e39e92b9d4e8779afc8c64 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 29 Jan 2025 11:55:33 +0100 Subject: [PATCH 2/4] some more --- .../requests/search/searchSingleIndex.json | 18 +++++ tests/CTS/requests/search/setSettings.json | 66 +++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/tests/CTS/requests/search/searchSingleIndex.json b/tests/CTS/requests/search/searchSingleIndex.json index 7551fe4b3f..8828d59638 100644 --- a/tests/CTS/requests/search/searchSingleIndex.json +++ b/tests/CTS/requests/search/searchSingleIndex.json @@ -1012,6 +1012,24 @@ } } }, + { + "testName": "api_filtering_range_example", + "parameters": { + "indexName": "indexName", + "searchParams": { + "query": "books", + "filters": "price:10 TO 20" + } + }, + "request": { + "path": "/1/indexes/indexName/query", + "method": "POST", + "body": { + "query": "books", + "filters": "price:10 TO 20" + } + } + }, { "testName": "search_a_query", "parameters": { diff --git a/tests/CTS/requests/search/setSettings.json b/tests/CTS/requests/search/setSettings.json index 9861e1bad8..51fd08835c 100644 --- a/tests/CTS/requests/search/setSettings.json +++ b/tests/CTS/requests/search/setSettings.json @@ -280,6 +280,72 @@ } } }, + { + "testName": "api_attributes_for_faceting", + "parameters": { + "indexName": "", + "indexSettings": { + "attributesForFaceting": [ + "genre", + "author" + ] + } + }, + "request": { + "path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings", + "method": "PUT", + "body": { + "attributesForFaceting": [ + "genre", + "author" + ] + } + } + }, + { + "testName": "api_attributes_for_faceting_searchable", + "parameters": { + "indexName": "", + "indexSettings": { + "attributesForFaceting": [ + "genre", + "searchable(author)" + ] + } + }, + "request": { + "path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings", + "method": "PUT", + "body": { + "attributesForFaceting": [ + "genre", + "searchable(author)" + ] + } + } + }, + { + "testName": "api_attributes_for_filter_only", + "parameters": { + "indexName": "", + "indexSettings": { + "attributesForFaceting": [ + "filterOnly(genre)", + "author" + ] + } + }, + "request": { + "path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings", + "method": "PUT", + "body": { + "attributesForFaceting": [ + "filterOnly(genre)", + "author" + ] + } + } + }, { "testName": "attributesForFaceting categoryPageId", "parameters": { From 7735585e9bba71cc0ed09405b98c2ece75b07f47 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 29 Jan 2025 12:18:02 +0100 Subject: [PATCH 3/4] out you go swift --- .github/workflows/check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2aaa9449ac..17be43fb5d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -301,7 +301,7 @@ jobs: path: clients-javascript.zip client_gen: - timeout-minutes: 15 + timeout-minutes: 20 # swift CTS is excruciatingly slow runs-on: ubuntu-22.04 needs: - setup @@ -381,6 +381,7 @@ jobs: run: yarn cli cts generate ${{ matrix.client.language }} ${{ matrix.client.toRun }} --language-version ${{ matrix.client.version }} - name: Run unit CTS + if: ${{ matrix.client.language != 'swift' || startsWith(github.head_ref, 'chore/prepare-release-') }} run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-e2e - name: Run e2e CTS From 85604d7d8b0e43d0ff23964ac4dc5f8b1fb5ee86 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 29 Jan 2025 12:28:25 +0100 Subject: [PATCH 4/4] e2e are slow too --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 17be43fb5d..e8392adb57 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -387,7 +387,7 @@ jobs: - name: Run e2e CTS id: cts-e2e continue-on-error: true - if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }} + if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && (matrix.client.language != 'swift' || startsWith(github.head_ref, 'chore/prepare-release-')) }} run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests - name: Retry e2e CTS