-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create elasticsearch module feat: create search module Revert "feat: create elasticsearch module" This reverts commit bcb9dda. feat(repo): add prettier organize plugin chore: move isTime function to utils feat: add course index in env file feat: update configuration file feat: add search module to app module chore(repo): remove unused files chore(repo): remove unused files feat: create course search interface feat: import elasticsearch module in search module feat: implement search service feat: implement with course service feat: add pagination refactor: change search service to use search request as input chore: add courseIndex to required configuration chore(dep): move prettier plugin organize import to root package refactor: change calling search method from course service to course resolver chore(dep): update lock file refactor: move interface to resolver chore: change return type to Course graphql chore: remove unused import feat(repo): add changeset chore(dep): add opensearch nestjs refactor: change to use opensearch nestjs chore: update config chore: remove unused statement refactor: update to beta v1.6.0 feat: register opensearch search service chore(dep): add opensearch nestjs feat: implement search service fix: ssl problem refactor: update query for opensearch lib chore(dep): update lock file feat: update template of scraper feat: update scraper config feat: create opensearch cli for create index feat: finish search feature chore(docs): update index information chore: implement upsert data from scraper to opensearch Update .changeset/enhance-search-engine.md Co-authored-by: Nut Pinyo <bomb.NP@gmail.com> refactor: move build course query to subdirectory fix: config error feat: change cli to execute file chore: update as review chore: add go project for opensearch cli
- Loading branch information
1 parent
dd83218
commit 0703c17
Showing
32 changed files
with
2,559 additions
and
869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'api': minor | ||
--- | ||
|
||
Enhance search engine with Elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,8 @@ data/ | |
.turbo | ||
|
||
out | ||
|
||
# opensearch-cli | ||
.idea | ||
opensearch.yaml | ||
apps/opensearch-cli/index/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
import { Module, Provider, forwardRef } from '@nestjs/common' | ||
import { Module, forwardRef } from '@nestjs/common' | ||
import { ConfigService } from '@nestjs/config' | ||
|
||
import { Client } from '@opensearch-project/opensearch' | ||
import { OpensearchModule } from 'nestjs-opensearch' | ||
|
||
import { AuthModule } from '../auth/auth.module' | ||
import { ClientLoggingController } from './clientlogging.controller' | ||
import { ClientLoggingService } from './clientlogging.service' | ||
|
||
const elasticProvider: Provider<Client> = { | ||
provide: Client, | ||
useFactory: (configService: ConfigService) => | ||
new Client({ | ||
node: configService.get('elasticUrl'), | ||
auth: { | ||
username: configService.get('elasticUsername'), | ||
password: configService.get('elasticPassword'), | ||
}, | ||
ssl: { | ||
rejectUnauthorized: false, | ||
@Module({ | ||
imports: [ | ||
forwardRef(() => AuthModule), | ||
OpensearchModule.forRootAsync({ | ||
clientName: 'default', | ||
inject: [ConfigService], | ||
useFactory: async (configService: ConfigService) => { | ||
return { | ||
nodes: configService.get<string>('opensearchUrl'), | ||
auth: { | ||
username: configService.get<string>('opensearchUsername'), | ||
password: configService.get<string>('opensearchPassword'), | ||
}, | ||
ssl: { | ||
rejectUnauthorized: !configService.get<boolean>('opensearchSkipSSL'), | ||
}, | ||
} | ||
}, | ||
}), | ||
inject: [ConfigService], | ||
} | ||
|
||
@Module({ | ||
providers: [ClientLoggingService, elasticProvider], | ||
], | ||
providers: [ClientLoggingService], | ||
controllers: [ClientLoggingController], | ||
imports: [forwardRef(() => AuthModule)], | ||
exports: [ClientLoggingService], | ||
}) | ||
export class ClientLoggingModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.