Skip to content

Commit 9b75dc8

Browse files
committed
[DE-524] Add optimizeTopK options
1 parent 48337b1 commit 9b75dc8

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ This driver uses semantic versioning:
4747

4848
This option was added in ArangoDB 3.11.
4949

50+
- Added `optimizeTopK` to `ArangoSearchView` and `InvertedIndex` types
51+
52+
This option was added in ArangoDB 3.11.
53+
5054
- Added `x-arango-driver` header
5155

5256
The arangojs driver now correctly identifies itself to ArangoDB, allowing the

src/indexes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,10 @@ export type EnsureInvertedIndexOptions = {
544544
* Default: `false`
545545
*/
546546
cache?: boolean;
547+
/**
548+
* An array of strings defining sort expressions to optimize.
549+
*/
550+
optimizeTopK?: string[];
547551
};
548552

549553
/**
@@ -689,6 +693,7 @@ export type InvertedIndex = GenericIndex & {
689693
writeBufferIdle: number;
690694
writeBufferActive: number;
691695
writeBufferSizeMax: number;
696+
optimizeTopK: string[];
692697
};
693698

694699
/**

src/view.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ export type CreateArangoSearchViewOptions =
325325
* in addition to those used for sorting via `primarySort`.
326326
*/
327327
storedValues?: ArangoSearchViewStoredValueOptions[] | string[] | string[][];
328+
/**
329+
* An array of strings defining sort expressions to optimize.
330+
*/
331+
optimizeTopK?: string[];
328332
};
329333

330334
/**
@@ -454,6 +458,7 @@ export type ArangoSearchViewProperties = ArangoSearchViewDescription & {
454458
cache: boolean;
455459
}[];
456460
links: Record<string, Omit<ArangoSearchViewLink, "nested">>;
461+
optimizeTopK: string[];
457462
};
458463

459464
/**

0 commit comments

Comments
 (0)