简体   繁体   中英

solr shards as *rolling* partitions

Is there a simple way to get solr to maintain shards as rolling partitions by date, eg, the last day's documents in one shard, the week before yesterday in the next shard, the month before that in the next shard, and so on? I really don't need querying to be fast on the entire index, but it is critical that it be blazing fast on recent documents.

A related but different question: in which config file can I change the default hash function to assign documents to shards? This outdated post http://wiki.apache.org/solr/NewSolrCloudDesign seems to suggest that you can define your own hash functions as well as assign hash ranges to partitions, but I am not sure whether or how solr 3.6 supports this. For that matter, I don't know whether or how SolrCloud (that I understand is available only in solr4) supports this. My goal is to have a non-uniform partitioning of documents across shards (unlike hash(ID)%numShards ) but I need an automated way of doing this as opposed to manually assigning documents to specific shards.

我认为SolrCloud中的自定义哈希尚未实现,更多信息SOLR-2592

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM