11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<br />

200<br />

<br />

<br />

<br />

<br />

<br />

As shown in the example above, the processor will return 200 to the client but will ignore the commit / optimize<br />

request. Notice that you need to wire-in the implicit processors needed by <strong>Solr</strong>Cloud as well, since this custom<br />

chain is taking the place of the default chain.<br />

In the following example, the processor will raise an exception with a 403 code with a customized error message:<br />

<br />

<br />

403<br />

Thou shall not issue a commit!<br />

<br />

<br />

<br />

<br />

<br />

Lastly, you can also configure it to just ignore optimize and let commits pass thru by doing:<br />

<br />

<br />

Thou shall not issue an optimize, but commits are<br />

OK!<br />

true<br />

<br />

<br />

<br />

Distributed Requests<br />

When a <strong>Solr</strong> node receives a search request, that request is routed behinds the scenes to a replica of some<br />

shard that is part of the collection being searched. The chosen replica will act as an aggregator: creating internal<br />

requests to randomly chosen replicas of every shard in the collection, coordinating the responses, issuing any<br />

subsequent internal requests as needed (For example, to refine facets values, or request additional stored fields)<br />

and constructing the final response for the client.<br />

Limiting Which Shards are Queried<br />

One of the advantages of using <strong>Solr</strong>Cloud is the ability to very large collections distributed among various shards<br />

– but in some cases you may know that you are only interested in results from a subset of your shards. You<br />

have the option of searching over all of your data or just parts of it.<br />

Querying all shards for a collection should look familiar; it's as though <strong>Solr</strong>Cloud didn't even come into play:<br />

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

550

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

Saved successfully!

Ooh no, something went wrong!