는 샘플 데이터입니다 :elasticsearch를 사용하여 결과별로 그룹에서 일부 단어를 검색하는 방법은 무엇입니까?
{"blog_id": 1, "comments": "Apple", "comment_id": 1}
그리고 #1
및 #2
블로그, 완전히이 type blog_comments
에서 6 개의 코멘트가 값 : type blog_comments
에서
, 나는 그 구조가이 같은 일부 의견 데이터를 가지고 :
{"blog_id": 1, "comments": "Apple", "comment_id": 1}
{"blog_id": 1, "comments": "Orange", "comment_id": 2}
{"blog_id": 1, "comments": "Fruit", "comment_id": 3}
{"blog_id": 2, "comments": "Apple", "comment_id": 1}
{"blog_id": 2, "comments": "Orange", "comment_id": 2}
{"blog_id": 2, "comments": "Earth", "comment_id": 3}
Question: Is it possible using some "magic" queries to get
# 1 # 2 as the result when I searching "Apple Fruit" and get
when I search "Apple Earth" ?
각 블로그에 대해 모든 댓글을 하나의 새 레코드 (새 유형)에 추가 한 다음이 새로운 유형에 대한 검색을 수행 할 것을 고려하고 있습니다. 그러나 너무 많은 의견 (약 12,000,000 개의 의견)이 있으며 이러한 의견은 이미 탄성 검색 검색에 색인되어 있으므로 가능한 한이 데이터를 사용하는 것이 좋습니다.