Skip to content

Commit

Permalink
Merge pull request #107 from Daseul1/feat/#103
Browse files Browse the repository at this point in the history
[#103]feat: 서버도메인 변경, 서치수정
  • Loading branch information
Daseul1 committed Apr 1, 2022
2 parents cba8eab + fc3a8d0 commit e4f4a71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion ars/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
cap_add:
- SYS_NICE
ports:
- 3306:3306
- 3307:3306

my_redis:
image: redis:6.2.6
Expand Down
12 changes: 7 additions & 5 deletions ars/src/apis/art/art.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ArtResolver {
}
// 레디스에 캐시가 되어있지 않다면, 엘라스틱서치에서 조회하기(유저가 검색한 검색어로 조회하기)
const result = await this.elasticsearchService.search({
index: 'artipul',
index: 'artipul01',
query: {
bool: {
should: [
Expand All @@ -72,6 +72,7 @@ export class ArtResolver {
tag2: el._source.tag2,
tag3: el._source.tag3,
tag4: el._source.tag4,
nickname: el._source.nickname,
}));

// 엘라스틱서치에서 조회 결과가 있다면, 레디스에 검색결과 캐싱해놓기
Expand Down Expand Up @@ -179,10 +180,11 @@ export class ArtResolver {
@Args('createArtInput') createArtInput: CreateArtInput, //
@CurrentUser() currentUser: ICurrentUser,
) {
// 엘라스틱서치에서 등록할때 한번 사용 후 주석
// const result = await this.elasticsearchService.create({
// id: 'artipulid',
// index: 'artipul',

//엘라스틱서치에서 등록할때 한번 사용 후 주석
// await this.elasticsearchService.create({
// id: 'artipulid01',
// index: 'artipul01',
// document: {
// ...createArtInput,
// currentUser,
Expand Down

0 comments on commit e4f4a71

Please sign in to comment.