56.fielddata filter的細粒度內存加載控制

   

語法: app

   

POST /test_index/_mapping/test_type 學習

{ spa

"properties": { 內存

"test_field": { io

"type": "text", class

"fielddata": { test

"filter": { exception

"frequency": { map

"min": 0.01, 語法

"min_segment_size": 500

}

}

}

}

}

}

   

min:僅僅加載至少在1%doc中出現過的term對應的fielddata。好比es總共有1000doc,現查詢的詞是hello,那麼hello必須在10doc中出現,這個hello對應的fielddata纔會加載到內存中來

min_segment_size500,是指少於500docsegment不加載fielddata

加載fielddata的時候,也是按照segment去進行加載的,某個segment裏面的doc數量少於500個,那麼這個segmentfielddata就不加載。

這項目設置偏底層了,在通常工做學習中,不用去設置。

另:

在我自已的環境中未實驗成功:

{

"error": {

"root_cause": [

{

"type": "illegal_argument_exception",

"reason": "Can't parse boolean value [{filter={frequency={min=0.01, min_segment_size=500}}}], expected [true] or [false]"

}

],

"type": "illegal_argument_exception",

"reason": "Can't parse boolean value [{filter={frequency={min=0.01, min_segment_size=500}}}], expected [true] or [false]"

},

"status": 400

}

相關文章
相關標籤/搜索