Split a Solr index 1.4

最后都变了- 提交于 2019-12-23 04:54:10

问题


I have a Solr index 1.4 whose size is more than 20 GB. I would like to split it in 2 or 3 indexes. Lucene 3.3 has the function PKIndexSplitter but it is not working with a Solr 1.4 index.

Is it possible to split a Solr index 1.4 ?

Thanks for help Medley


回答1:


No there is no "method" in Solr 1.4 to do that. What you need to do is make two copies of the index. In each copy, delete records. Then optimize.

Then you can do a DistributedSearch over both indexes.

Hope it helps.




回答2:


I wrote a command-line utility to split up a Lucene index into shards, based on the recommended method of

document.uniqueId.hashCode() % numShards

You can grab it from GitHub: Hash-Based Index Splitter

See also the Multi Pass Index Splitter, which can split up your index either sequentially (e.g. [1,1,1,2,2,2,3,3,3,4,4,4]) or round-robin (e.g. [1,2,3,4,1,2,3,4,1,2,3,4]).

Since the docs don't include the usage for the latter, here it is:

Usage: MultiPassIndexSplitter -out <outputDir> -num <numParts> [-seq] <inputIndex1> [<inputIndex2 ...]
    inputIndex  path to input index, multiple values are ok
    -out ouputDir   path to output directory to contain partial indexes
    -num numParts   number of parts to produce
    -seq    sequential docid-range split (default is round-robin)


来源:https://stackoverflow.com/questions/6869293/split-a-solr-index-1-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!