Skip to content

Commit 723671d

Browse files
shortcutsFluf22
authored andcommitted
fix: cts
1 parent b52ed39 commit 723671d

File tree

3 files changed

+349
-353
lines changed

3 files changed

+349
-353
lines changed

playground/javascript/node/search.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ console.log('version', apiClientVersion, 'requests', requests);
1717

1818
async function testSearch() {
1919
try {
20-
const res = await client.search({
21-
requests:
22-
[
23-
{ indexName: 'foo', hitsPerPage: 2 }
24-
]
25-
});
20+
const req = await client.setSettings({
21+
indexName: 'theIndexName',
22+
indexSettings: { distinct: 'company' },
23+
})
2624

2725
// @ts-ignore
28-
console.log(`[OK]`, res.results[0].hits);
26+
console.log(`[OK]`, req);
2927
} catch (e: any) {
3028
// Instance of
3129
if (e instanceof ApiError) {

tests/CTS/requests/search/setSettings.json

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -190,40 +190,6 @@
190190
}
191191
}
192192
},
193-
{
194-
"testName": "distinct company",
195-
"isSnippet": true,
196-
"parameters": {
197-
"indexName": "theIndexName",
198-
"indexSettings": {
199-
"distinct": "company"
200-
}
201-
},
202-
"request": {
203-
"path": "/1/indexes/theIndexName/settings",
204-
"method": "PUT",
205-
"body": {
206-
"distinct": "company"
207-
}
208-
}
209-
},
210-
{
211-
"testName": "distinct design",
212-
"isSnippet": true,
213-
"parameters": {
214-
"indexName": "theIndexName",
215-
"indexSettings": {
216-
"distinct": "design"
217-
}
218-
},
219-
"request": {
220-
"path": "/1/indexes/theIndexName/settings",
221-
"method": "PUT",
222-
"body": {
223-
"distinct": "design"
224-
}
225-
}
226-
},
227193
{
228194
"testName": "distinct true",
229195
"isSnippet": true,
@@ -241,25 +207,6 @@
241207
}
242208
}
243209
},
244-
{
245-
"testName": "distinct section",
246-
"isSnippet": true,
247-
"parameters": {
248-
"indexName": "theIndexName",
249-
"indexSettings": {
250-
"attributeForDistinct": "section",
251-
"distinct": true
252-
}
253-
},
254-
"request": {
255-
"path": "/1/indexes/theIndexName/settings",
256-
"method": "PUT",
257-
"body": {
258-
"attributeForDistinct": "section",
259-
"distinct": true
260-
}
261-
}
262-
},
263210
{
264211
"testName": "attributesForFaceting allergens",
265212
"isSnippet": true,

0 commit comments

Comments
 (0)