[Elasticsearch] IndexCacheModule...

Elastic/Elasticsearch 2013. 9. 2. 17:40

index cache module 뭐가 있는지 한번 볼까요?


        new FilterCacheModule(settings).configure(binder());

        new IdCacheModule(settings).configure(binder());

        new QueryParserCacheModule(settings).configure(binder());

        new DocSetCacheModule(settings).configure(binder());


검색 질의와 결과 셋에 대한 cache 가 위에서 보면

        new QueryParserCacheModule(settings).configure(binder());

        new DocSetCacheModule(settings).configure(binder());

이 두 놈이 비슷해 보입니다.


근데 소스 들어가서 보면 정말 원하는 내용은 아니라는 걸 알 수 있습니다.

QueryParserCacheModule 은 요청한 질의에 대한 Query 를 매번 만들지 않고 cache 에서 가져 올 수 있는 기능이라 뭐 괜찮아 보이구요.

DocSetCacheModule 은 docId 기반의 cache 라서 ㅎㅎ document 단위로 cache 정보를 읽어 오는 기능 입니다.

즉, 검색 질의에 대한 결과셋을 cache 하고 싶으신 경우는 그냥 memcached 나 redis 같은걸 이용해서 cache 하시면 되겠습니다.

: