MCPcopy Create free account
hub / github.com/axe-api/axe-api / createIndex

Method createIndex

packages/axe-api/src/Services/ElasticService.ts:15–22  ·  view source on GitHub ↗
(modelName: string)

Source from the content-addressed store, hash-verified

13 }
14
15 async createIndex(modelName: string) {
16 const index = this.toIndex(modelName);
17 const result = await this.client.indices.exists({ index });
18 if (result === false) {
19 await this.client.indices.create({ index });
20 LogService.debug(`ES.create({ index: ${index} })`);
21 }
22 }
23
24 async insert(modelName: string, id: string, body: any) {
25 const index = this.toIndex(modelName);

Callers 1

buildMethod · 0.80

Calls 2

toIndexMethod · 0.95
debugMethod · 0.80

Tested by

no test coverage detected