Skip to content

Commit

Permalink
chore: opensearch 주석 해제
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Yeji committed Nov 2, 2024
1 parent f4be569 commit 45cb73c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.samtuap.inong.domain.product.repository.PackageProductRepository;
import org.samtuap.inong.domain.seller.entity.Seller;
import org.samtuap.inong.domain.seller.repository.SellerRepository;
import org.samtuap.inong.search.document.PackageProductDocument;
import org.samtuap.inong.search.service.PackageProductSearchService;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
Expand Down Expand Up @@ -142,8 +143,8 @@ public PackageProductCreateResponse createPackageProduct(Long sellerId, PackageP
packageProductImageService.saveImages(savedPackageProduct, imageUrls);

// elasticsearch✔️ : open search에 인덱싱
// PackageProductDocument packageProductDocument = PackageProductDocument.convertToDocument(savedPackageProduct);
// packageProductSearchService.indexProductDocument(packageProductDocument);
PackageProductDocument packageProductDocument = PackageProductDocument.convertToDocument(savedPackageProduct);
packageProductSearchService.indexProductDocument(packageProductDocument);

// 저장된 엔티티를 DTO로 반환
return PackageProductCreateResponse.fromEntity(savedPackageProduct, imageUrls);
Expand Down Expand Up @@ -174,7 +175,7 @@ public void deletePackage(Long sellerId, Long packageId) {
}

// elasticsearch✔️ : 삭제
// packageProductSearchService.deleteProduct(String.valueOf(packageId));
packageProductSearchService.deleteProduct(String.valueOf(packageId));
}

@Transactional
Expand Down Expand Up @@ -203,8 +204,8 @@ public void updatePackageProduct(Long sellerId, Long packageId, PackageProductUp
}

// elasticsearch✔️ : open search에 수정
// PackageProductDocument updateProduct = PackageProductDocument.convertToDocument(packageProduct);
// packageProductSearchService.updateProduct(updateProduct);
PackageProductDocument updateProduct = PackageProductDocument.convertToDocument(packageProduct);
packageProductSearchService.updateProduct(updateProduct);
}

// Feign 요청 용
Expand Down

0 comments on commit 45cb73c

Please sign in to comment.