solr4.4ノートの最適化

1822 ワード

次の手順に従います.
indexed fields
The number of indexed fields greatly increases the following:
1.Memory usage during indexing
2.Segment merge time
3.Optimization times
4.Index size
These effects can be reduced by the use of omitNorms="true"

omitNorms:this disables length normalization and index-time boosting for the field, and saves some memory,defaults to true for primitive field types (int, float, boolean, string...)

次の手順に従います.
Parameters
Lets define a couple of parameters involved in the process of merging the segments that compose an index:

mergeFactor: this parameter determines many things, like how many segments are going to be merged into a new one, the maximum number of segments that can be in a level and the span of each level. Can be set in solrconfig.xml.
minMergeSize: all segments whose size is less than this parameter’s value will belong to the same level. This value is fixed.
maxMergeSize: all segments whose size is greater than this parameter’s value won’t be ever merged. This value is fixed.
maxMergeDocs: all segments containing more documents than this parameter’s value won’t be merged. Can be set in solrconfig.xml.

noting:
minMergeSize has a fixed value of 1.6 MiB. This means that any segment whose size is less than 1.6 MiB will be included in the last level.
maxMergeSize has a fixed value of 2 GiB. This means that any segment whose size is greater than 2 GiB will never be merged.

データベーステーブル用solrインデックス
[url]Index a DB table directly into Solr[/url]
http://wiki.apache.org/solr/DataImportHandler