11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

http://localhost:8983/solr/gettingstarted/select?q=*:*<br />

If, on the other hand, you wanted to search just one shard, you can specify that shard by it's logical ID, as in:<br />

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=shard1<br />

If you want to search a group of shard Ids, you can specify them together:<br />

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=shard1,shard2<br />

In both of the above examples, the shard Id(s) will be used to pick a random replica of that shard.<br />

Alternatively, you can specify the explict replicas you wish to use in place of a shard Ids:<br />

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/ge<br />

ttingstarted,localhost:8983/solr/gettingstarted<br />

Or you can specify a list of replicas to choose from for a single shard (for load balancing purposes) by using the<br />

pipe symbol (|):<br />

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/ge<br />

ttingstarted|localhost:7500/solr/gettingstarted<br />

And of course, you can specify a list of shards (seperated by commas) each defined by a list of replicas<br />

(seperated by pipes). In this example, 2 shards are queried, the first being a random replica from shard1, the<br />

second being a random replica from the explicit pipe delimited list:<br />

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=shard1,localhost:7574/<br />

solr/gettingstarted|localhost:7500/solr/gettingstarted<br />

Configuring the ShardHandlerFactory<br />

You can directly configure aspects of the concurrency and thread-pooling used within distributed search in <strong>Solr</strong>.<br />

This allows for finer grained control and you can tune it to target your own specific requirements. The default<br />

configuration favors throughput over latency.<br />

To configure the standard handler, provide a configuration like this in the solrconfig.xml:<br />

<br />

<br />

<br />

1000<br />

5000<br />

<br />

<br />

The parameters that can be specified are as follows:<br />

Parameter Default Explanation<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

551

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!