2014-11-23 134 views
0

我已經開始使用重要術語聚合來查看哪些關鍵字在文檔組中與我已編入索引的整組文檔相比非常重要。Elasticsearch重要術語聚合

它很有效,直到很多文檔被索引。然後,對於曾經工作過的相同的查詢,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 
     } 

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

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

回答

0

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

2

如果數據集很大以計算一臺機器上的結果,則可能需要多於一個節點。

在規劃分片分發時要考慮周到。確保碎片正確分佈,以便在計算重度查詢時同樣強調每個節點。大數據集的良好拓撲是Master-Data-Search配置,其中您有一個節點充當主節點(沒有數據,沒有在該節點上運行的查詢)。少數節點專用於保存數據(碎片),一些節點專用於執行查詢(它們不保存數據,它們使用數據節點執行部分查詢併合並結果)。對於初學者Netflix正在使用這種拓撲結構Netflix raigad enter image description here

PawełRóg是正確的,您將需要更多的RAM。對於初學者來說,增加每個節點可用的Java堆大小。有關詳細信息,請參見此網站:ElasticSearch configuration 您必須重新研究多少內存就足夠了。有時候,太多的RAM實際上會減慢ES(除非它在最近的版本中被修復)。

+0

所以真正的放緩..增加內存在冷杉真的放緩elasticsearch。必須嘗試更新的版本。 – paweloque 2014-11-25 14:10:39