You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/06/26 09:43:57 UTC
[Solr Wiki] Update of "DistributedSearch" by Upayavira
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "DistributedSearch" page has been changed by Upayavira:
https://wiki.apache.org/solr/DistributedSearch?action=diff&rev1=26&rev2=27
If single queries are currently fast enough and one simply wishes to expand the capacity (queries/sec) of the search system, then standard whole [[CollectionDistribution|index replication]] should be used.
+ This page covers the Solr 3.x approach to distributed search. It notes when 4.x provides alternatives, but you should see the SolrCloud page for a fuller description of the many advances in 4.x when working with distributed indexes.
+
<<TableOfContents>>
= Distributed Searching =
The presence of the '''shards''' parameter in a request will cause that request to be distributed across all shards in the list. The syntax of '''shards''' is host:port/base_url[,host:port/base_url]* A sharded request will go to the standard request handler (not necessarily the original); this can be overridden via '''shards.qt'''.
- Since [[https://issues.apache.org/jira/browse/SOLR-3134|SOLR-3134]] it is possible to obtain numFound, maxScore and time per shard in a distributed search query. Use '''shards.info=true''' to enable this feature. The '''shards.tolerant=true''' parameter includes error information if available.
+ Since [[https://issues.apache.org/jira/browse/SOLR-3134|SOLR-3134]] it is possible to obtain numFound, maxScore and time per shard in a distributed search query. Use '''shards.info=true''' to enable this feature. The '''shards.tolerant=true''' parameter includes error information if available. (SolrCloud can handle this for you in a more transparent way).
Currently, only query requests will be distributed. This includes requests to the standard request handler (and subclasses such as the dismax request handler), and any other handler (org.apache.solr.handler.component.SearchHandler) using standard components that support distributed search.
@@ -52, +54 @@
= Distributed Indexing =
It's up to the user to distribute documents across shards. The easiest method to determine what server a document should be indexed at is to use something like '''uniqueId.hashCode() % numServers'''.
+ SolrCloud does implement distributed indexing and has various strategies available.
- See Also...
- * SolrCloud
= Distributed Search Example =
For simple functionality testing, it's easiest to just set up two local Solr servers on different ports.
@@ -83, +84 @@
curl 'http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=ipod+solr'
}}}
+ Again, see SolrCloud page for an example of a more current approach to distributed search.
+