클라이밍 커뮤니티 서비스의 게시글 RAG 검색 기능을 개발하던 도중
Redisearch 조회 수행시 메타데이터가 받아져오지 않는 버그가 발생했다.
climbingwith-app | 2026-04-17T09:40:06.593Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.service.VectorService : 조회시도 id list: []
climbingwith-app | 2026-04-17T09:40:06.593Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.service.VectorService : 검색결과: 0
climbingwith-app | 2026-04-17T09:40:06.622Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.service.VectorService : 게시물 조회: []
climbingwith-app | 2026-04-17T09:40:06.622Z INFO 1 ---
RedisSearch 저장은 제대로 되어 있는 상황이다.

EmbeddingStore 설정 등록 문제
metadatakeys 설정 누락으로 인해 인덱스 생성시 postId가 누락된 스키마가 생성되었다.
그렇기에 추가해서 재빌드를 해보았으나
@Configuration
public class VectorStoreConfig {
@Bean
public EmbeddingStore<TextSegment> embeddingStore(){
return RedisEmbeddingStore.builder()
.host("vector")
.port(6379)
.dimension(1024) //bge-m3 차원
.metadataKeys(List.of("postId")) // << 누락!
.indexName("climbing-knowledge-Index")
.build();
}
}
여전히 조회되지 않고있다.
10:00:41.000Z. Current time: 2026-04-17T10:04:10.312Z. Allowed clock skew: 0 milliseconds.
climbingwith-app | 2026-04-17T10:04:13.563Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.r.impl.VectorRepositoryImpl : 검색어: 분실물, 검색 갯수: 10
climbingwith-app | 2026-04-17T10:04:13.578Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.r.impl.VectorRepositoryImpl : 검색결과 여부: true
climbingwith-app | 2026-04-17T10:04:13.579Z INFO 1 --- [ClimbingWith] [nio-8080-exec-1] c.p.g.C.r.impl.VectorRepositoryImpl : 검색된 메타데이터: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
LangChain4j의 인덱스 체크로직
RedisSearch는 인덱스를 처음 생성할 때 인덱스 존재 여부를 확인하고
다른 문제가 아니라 인덱스를 삭제하고 다시 주면된다고 한다..