簡體   English   中英

Elasticsearch重要術語聚合

[英]Elasticsearch significant terms aggregation

我已經開始使用重要術語聚合來查看哪些關鍵字在文檔組中比已索引的整個文檔集中重要。

直到對許多文檔建立索引之前,它都很好用。 然后,對於以前使用的相同查詢,elasticsearch只說:

 SearchPhaseExecutionException[Failed to execute phase [query], 
 all shards failed; shardFailures {[OIWBSjVzT1uxfxwizhS5eg][demo_paragraphs][0]:
 CircuitBreakingException[Data too large, data for field [text] 
 would be larger than limit of [633785548/604.4mb]];

我的查詢如下所示:

 POST /demo_paragraphs/_search
 {
     "query": {
         "match": {
            "django_target_id": 1915661
         }
     },
     "aggregations" : {
         "signKeywords" : {
             "significant_terms" : {
                 "field" : "text"
             }
         }
     }
 }

以及文件結構:

        "_source": {
           "django_ct": "citations.citation",
           "django_target_id": 1915661,
           "django_id": 3414077,
           "internal_citation_id": "CR7_151",
           "django_source_id": 1915654,
           "text": "Mucin 1 (MUC1) is a protein heterodimer that is overexpressed in lung cancers [6]. MUC1 consists of two subunits, an N-terminal extracellular subunit (MUC1-N) and a C-terminal transmembrane subunit (MUC1-C). Overexpression of MUC1 is sufficient for the induction of anchorage independent growth and tumorigenicity [7]. Other studies have shown that the MUC1-C cytoplasmic domain is responsible for the induction of the malignant phenotype and that MUC1-N is dispensable for transformation [8]. Overexpression of",
           "id": "citations.citation.3414077",
           "num_distinct_citations": 0
        }

我索引的數據是來自科學論文的段落。 沒有文件真的很大。

關於如何分析或解決問題的任何想法?

如果數據集很大,無法在一台計算機上計算結果,則可能需要一個以上的節點。

計划分片分發時要考慮周到。 確保分片正確分布,以便在計算繁重的查詢時對每個節點都施加相同的壓力。 對於大型數據集,一種很好的拓撲結構是“主數據搜索”配置,在該配置中,您有一個節點充當主節點(該節點上沒有數據,也沒有查詢在運行)。 一些節點專用於保存數據(分片),一些節點專用於執行查詢(它們不保存數據,它們將數據節點用於部分查詢執行並合並結果)。 Netflix首先使用這種拓撲Netflix raigad 在此處輸入圖片說明

PawełRóg是正確的,您將需要更多的RAM。 首先,增加每個節點可用的java堆大小。 請參閱此站點以獲取詳細信息: ElasticSearch配置您必須重新搜索多少內存就足夠了。 有時太多的RAM實際上會減慢ES(除非在最新版本中已修復)。

我認為有一個簡單的解決方案。 請給ES更多RAM:D聚合需要大量內存。

請注意,在elasticsearch 6.0未來還有新的significant_text聚集不需要現場數據。 參見https://www.elastic.co/guide/zh-CN/elasticsearch/reference/master/search-aggregations-bucket-significanttext-aggregation.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM