Skip to content

Commit

Permalink
guides: update the snippets according to the doc review (#4412)
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp authored Jan 29, 2025
1 parent 8e10eeb commit 6ecf7d3
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -381,12 +381,13 @@ 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
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
Expand Down
18 changes: 18 additions & 0 deletions tests/CTS/requests/search/searchSingleIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
86 changes: 86 additions & 0 deletions tests/CTS/requests/search/setSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,72 @@
}
}
},
{
"testName": "api_attributes_for_faceting",
"parameters": {
"indexName": "<YOUR_INDEX_NAME>",
"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": "<YOUR_INDEX_NAME>",
"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": "<YOUR_INDEX_NAME>",
"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": {
Expand Down Expand Up @@ -788,6 +854,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": {
Expand Down

0 comments on commit 6ecf7d3

Please sign in to comment.