Skip to content

Commit

Permalink
chore: temp search index
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd committed Mar 28, 2024
1 parent 3695f71 commit 5a5263a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions next/api/src/service/search-ticket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,15 @@ export class SearchTicketService {
);

await this.esClient.bulk({
body: docs.flatMap((doc) => [{ index: { _index: this.indexName, _id: doc.objectId } }, doc]),
body: docs.flatMap((doc) => [
{
index: {
_index: this.indexName + '-tmp',
_id: doc.objectId,
},
},
doc,
]),
});
}

Expand Down Expand Up @@ -292,7 +300,7 @@ export class SearchTicketService {
.toJSON();

const res = await this.esClient.search({
index: this.indexName,
index: [this.indexName, this.indexName + '-tmp'],
body,
});

Expand Down

0 comments on commit 5a5263a

Please sign in to comment.