Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 3260388

Browse files
authored
✨ Feature: 벡터 검색 기능 추가
* ✨ Feat: 벡터 검색 기능 개발 * ♻️ Refactor: 벡터 검색 기능 리팩토링 및 헥사고날 아키텍처 적용 * ♻️ Refactor: 헥사고날 아키텍쳐에 맞게 일부 객체의 반환값을 변경하였습니다, 컨트롤러에서 parameter가 아닌 객체로 값을 받도록 수정하였습니다. * ♻️ Refactor: 이제 헥사고날 아키텍처에 따라 도메인 객체가 서비스 계층 내부에만 존재합니다, 규칙에 맞추어 Exception처리가 추가되었습니다, 모든 클래스에 주석을 추가하였습니다. * ♻️ Refactor: Index와 Search 기능이 각각 독립적으로 실행될 수 있도록 분리하였습니다. * 🚨 Hotfix: gitignore를 수정하였습니다
1 parent 30e935d commit 3260388

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.likelion.backendplus4.yakplus.index.application.port.out;
2+
3+
import com.likelion.backendplus4.yakplus.index.domain.model.Drug;
4+
5+
import java.util.List;
6+
7+
public interface DrugIndexRepositoryPort {
8+
void saveAll(List<Drug> drugs);
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.likelion.backendplus4.yakplus.index.application.port.out;
2+
3+
public interface EmbeddingPort {
4+
float[] getEmbedding(String text);
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.likelion.backendplus4.yakplus.index.application.port.out;
2+
3+
import com.likelion.backendplus4.yakplus.index.domain.model.Drug;
4+
import org.springframework.data.domain.Pageable;
5+
6+
import java.util.List;
7+
8+
public interface GovDrugRawDataPort {
9+
List<Drug> fetchRawData(Long lastSeq, Pageable pageable);
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.likelion.backendplus4.yakplus.search.application.port.out;
2+
3+
import java.util.List;
4+
import com.likelion.backendplus4.yakplus.search.domain.model.Drug;
5+
6+
public interface DrugSearchRepositoryPort {
7+
List<Drug> searchBySymptoms(String query, float[] vector, int from, int size);
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.likelion.backendplus4.yakplus.search.application.port.out;
2+
3+
public interface EmbeddingPort {
4+
float[] getEmbedding(String text);
5+
}

0 commit comments

Comments
 (0)