Skip to content

Elasticsearch 검색 가능 시점 #16

Answered by LEEHYUNDONG
LEEHYUNDONG asked this question in Q&A
Discussion options

You must be logged in to vote

@annie1004619 @guswns3371 @minseongkim97

거의 구석구석 다 뒤져봤는데요. 이 질문에 답을 포함한 곳이 없었습니다.

근데 생각해보니 당연한거 같은게 공식 홈페이지에도 "실시간에 준하는" 이런 말 뒤에 1초 정도 검색하는데 시간이 걸린다고 했습니다. 다들 봤죠??
elasticsearch는 검색엔진이기 때문에 데이터베이스와 연결이 되어야 데이터를 불러서 읽어오니까요..
index를 걸어주는 것은 elasticsearch가 자동으로 해주기도 하지만 개발자가 직접 index를 거는 경우가 많다고 합니다.
그래서 제 생각은 데이터베이스에 저장된 것을 불러와서 데이터를 읽어오기 때문에 disk io에 저장된 값을 불러오지 않을까 입니다. (잘못된 생각🤣)

그리고 "apache lucene기반"이기 때문에 "인덱스 내의 샤드 내의 루씬 세그먼트 형태로 저장된다." 여기에 답은 elasticsearch가 아니라 루씬에 있는거 같습니다. 각각의 인덱스가 루씬 라이브러리를 각각 가지고 있다고 하네요

방금 글 쓰다가 검색하면서 해답을 찾았습니다.🤭
https://www.elastic.co/guide/en/elasticsearch/guide/current/near-real-time.html

Lucene allows new segments to be written and opened—​making the document…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by LEEHYUNDONG
Comment options

You must be logged in to vote
1 reply
@LEEHYUNDONG
Comment options

LEEHYUNDONG Mar 31, 2022
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants