Skip to content

Commit 6ecf7d3

Browse files
authored
guides: update the snippets according to the doc review (#4412)
1 parent 8e10eeb commit 6ecf7d3

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ jobs:
301301
path: clients-javascript.zip
302302

303303
client_gen:
304-
timeout-minutes: 15
304+
timeout-minutes: 20 # swift CTS is excruciatingly slow
305305
runs-on: ubuntu-22.04
306306
needs:
307307
- setup
@@ -381,12 +381,13 @@ jobs:
381381
run: yarn cli cts generate ${{ matrix.client.language }} ${{ matrix.client.toRun }} --language-version ${{ matrix.client.version }}
382382

383383
- name: Run unit CTS
384+
if: ${{ matrix.client.language != 'swift' || startsWith(github.head_ref, 'chore/prepare-release-') }}
384385
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-e2e
385386

386387
- name: Run e2e CTS
387388
id: cts-e2e
388389
continue-on-error: true
389-
if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
390+
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-')) }}
390391
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
391392

392393
- name: Retry e2e CTS

tests/CTS/requests/search/searchSingleIndex.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,24 @@
10121012
}
10131013
}
10141014
},
1015+
{
1016+
"testName": "api_filtering_range_example",
1017+
"parameters": {
1018+
"indexName": "indexName",
1019+
"searchParams": {
1020+
"query": "books",
1021+
"filters": "price:10 TO 20"
1022+
}
1023+
},
1024+
"request": {
1025+
"path": "/1/indexes/indexName/query",
1026+
"method": "POST",
1027+
"body": {
1028+
"query": "books",
1029+
"filters": "price:10 TO 20"
1030+
}
1031+
}
1032+
},
10151033
{
10161034
"testName": "search_a_query",
10171035
"parameters": {

tests/CTS/requests/search/setSettings.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,72 @@
280280
}
281281
}
282282
},
283+
{
284+
"testName": "api_attributes_for_faceting",
285+
"parameters": {
286+
"indexName": "<YOUR_INDEX_NAME>",
287+
"indexSettings": {
288+
"attributesForFaceting": [
289+
"genre",
290+
"author"
291+
]
292+
}
293+
},
294+
"request": {
295+
"path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings",
296+
"method": "PUT",
297+
"body": {
298+
"attributesForFaceting": [
299+
"genre",
300+
"author"
301+
]
302+
}
303+
}
304+
},
305+
{
306+
"testName": "api_attributes_for_faceting_searchable",
307+
"parameters": {
308+
"indexName": "<YOUR_INDEX_NAME>",
309+
"indexSettings": {
310+
"attributesForFaceting": [
311+
"genre",
312+
"searchable(author)"
313+
]
314+
}
315+
},
316+
"request": {
317+
"path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings",
318+
"method": "PUT",
319+
"body": {
320+
"attributesForFaceting": [
321+
"genre",
322+
"searchable(author)"
323+
]
324+
}
325+
}
326+
},
327+
{
328+
"testName": "api_attributes_for_filter_only",
329+
"parameters": {
330+
"indexName": "<YOUR_INDEX_NAME>",
331+
"indexSettings": {
332+
"attributesForFaceting": [
333+
"filterOnly(genre)",
334+
"author"
335+
]
336+
}
337+
},
338+
"request": {
339+
"path": "/1/indexes/%3CYOUR_INDEX_NAME%3E/settings",
340+
"method": "PUT",
341+
"body": {
342+
"attributesForFaceting": [
343+
"filterOnly(genre)",
344+
"author"
345+
]
346+
}
347+
}
348+
},
283349
{
284350
"testName": "attributesForFaceting categoryPageId",
285351
"parameters": {
@@ -788,6 +854,26 @@
788854
}
789855
}
790856
},
857+
{
858+
"testName": "create replica index articles",
859+
"parameters": {
860+
"indexName": "theIndexName",
861+
"indexSettings": {
862+
"replicas": [
863+
"articles_date_desc"
864+
]
865+
}
866+
},
867+
"request": {
868+
"path": "/1/indexes/theIndexName/settings",
869+
"method": "PUT",
870+
"body": {
871+
"replicas": [
872+
"articles_date_desc"
873+
]
874+
}
875+
}
876+
},
791877
{
792878
"testName": "create virtual replica index",
793879
"parameters": {

0 commit comments

Comments
 (0)