当前位置: Coin163 >>

Solr 4.4 指南摘要(一)

2013-09-25 | 所属分类:solr 分发 复制

The Well-Configured Solr Instance

There are also options to scale through sharding or replication , described in the section Legacy Scaling and Distribution .

   By default, Solr stores its index data in a directory called /data under the Solr home

Legacy Scaling and Distribution

distribution replication

 

Solr Index Replication :

在多个服务器间分发索引   distributing

在多个多个服务器中复制索引 replicating

合并索引    merging index

 

What Problem Does Distribution Solve?

If searches are taking too long or the index is approaching the physical limitations of its machine, you should consider distributing the index across

two or more Solr servers.

To distribute an index, you divide the index into partitions called shards, each of which runs on a separate machine. Solr then partitions searches

into sub-searches, which run on the individual shards, reporting results collectively. The architectural details underlying index sharding are

invisible to end users, who simply experience faster performance on queries against very large indexes.

What Problem Does Replication Solve?

Replicating an index is useful when:

You have a large search volume which one machine cannot handle, so you need to distribute searches across multiple read-only copies of the index.

There is a high volume/high rate of indexing which consumes machine resources and reduces search performance on the indexing machine, so you need to separate indexing and searching. (分离索引和搜索)

You want to make a backup of the index (see Backing Up ).

  solr-shard

 

 

If single queries are currently fast enough and if one simply wants to expand the capacity (queries/sec) of the search system,then standard index replication ( replicating the entire index on multiple servers ) should be used instead of index sharding.

 

Update commands may be sent to any server with distributed indexing configured correctly. Document adds and deletes are forwarded to the appropriate server/shard based on a hash of the unique document id. commit commands and deleteByQuery commands are sent to every server in shards.

 

Distributed Support for Date and Numeric Range Faceting

  solr-replication

 

Replication Terminology

 

Inserts and Deletes

As inserts and deletes occur in the collection, the directory remains unchanged. Documents are always inserted into newly created files. Documents that are deleted are not removed from the files . They are flagged in the file, deletable, and are not removed from the files until the collection is optimized .

Master and Slave

The Solr distribution model uses the master/slave model. The master is the service which receives all updates initially and keeps everything organized. Solr uses a single update master server coupled with multiple query slave servers. All changes (such as inserts, updates, deletes, etc.) are made against the single master server. Changes made on the master are distributed to all the slave servers which service all query requests from the clients.

上一篇:
下一篇:

关于Coin163网站地图

Copyright 2012-2013 Coin163.com ( Coin163 ) All Rights Reserved