This param will cause loading the underlying fields used in faceting to be executed in parallel with the number of threads specified. Specify as facet.threads=N where N is the maximum number of threads used. Omitting this parameter or specifying the thread count as 0 will not spawn any threads, and only the main request thread will be used. Specifying a negative number of threads will create up to Integer.MAX_VALUE threads.
POST FILTER Post Filter是一个特殊filter。它在所有的main query和filter执行完毕后才开始执行，即在mainquery和filter产生的最后交集文档后执行post filter。 post filter类似于前面提到的将filter设置为cost=100. post filter 一般用于高开销的检索和匹配。自己可以实现postfiler interface实现自己的post filter。
The fq parameter defines a query that can be used to restrict the superset of documents that can be returned, without influencing score. It can be very useful for speeding up complex queries, since the queries specified with fq are cached independently of the main query. When a later query uses the same filter, there’s a cache hit, and filter results are returned quickly from the cache. When using the fq parameter, keep in mind the following:
The fq parameter can be specified multiple times in a query. Documents will only be included in the result if they are in the intersection of the document sets resulting from each instance of the parameter. In the example below, only documents which have a popularity greater then 10 and have a section of 0 will match.fq=popularity:[10 TO *]&fq=section:0
Filter queries can involve complicated Boolean queries. The above example could also be written as a single fq with two mandatory clauses like so:fq=+popularity:[10 TO *] +section:0
The document sets from each filter query are cached independently. Thus, concerning the previous examples: use a single fq containing two mandatory clauses if those clauses appear together often, and use two separate fq parameters if they are relatively independent. (To learn about tuning cache sizes and making sure a filter cache actually exists, see The Well-Configured Solr Instance.)
It is also possible to use filter(condition) syntax inside the fq to cache clauses individually and – among other things – to achieve union of cached filter queries.
As with all parameters: special characters in an URL need to be properly escaped and encoded as hex values. Online tools are available to help you with URL-encoding. For example: http://meyerweb.com/eric/tools/dencoder/.
1 、每一个fq参数都会首先到filter cache中查询文档是否存在。 2、如果fq参数没有在 filter cache 找到，就会检索索引文件，并将检索到docset放入缓存中。 3、所有filter的docset进行取交集，最终生成一个唯一的docset。 4 、The q parameter is passed in (along with the filter DocSet) to be executed as a Lucene query. When executing the query, Lucene plays leapfrog between the query and combined filters, advancing both the query and filter results objects to their next present internal ID (an integer). When both the query result and filter result objects contain the same ID, that ID is collected, a process that includes generating the relevancy score for the document 这段我翻译的不太清楚。意思大概是将q查出来的结果和前面filter的结果进行交集，最后为交集的每一个结果计算相关性评分。 5、执行post filter
具体可以参考solr的官方指南：Combining Distribution and Replication 章节 。简单来说就是一主两从。从片的同步方式，我觉得应该是通过从主片同步快照的方式，来实现的。
Snapshot ：A directory containing hard links to the data files of an index. Snapshots are distributed from the master nodes when the slaves pull them, “smart copying” any segments the slave node does not have in snapshot directory that contains the hard links to the most recent index data files.
NRT: This is the default. A NRT replica (NRT = NearRealTime) maintains a transaction log and writes new documents to it’s indexes locally. Any replica of this type is eligible to become a leader. Traditionally, this was the only type supported by Solr.
TLOG: This type of replica maintains a transaction log but does not index document changes locally. This type helps speed up indexing since no commits need to occur in the replicas. When this type of replica needs to update its index, it does so by replicating the index from the leader. This type of replica is also eligible to become a shard leader; it would do so by first processing its transaction log. If it does become a leader, it will behave the same as if it was a NRT type of replica.
PULL: This type of replica does not maintain a transaction log nor index document changes locally. It only replicates the index from the shard leader. It is not eligible to become a shard leader and doesn’t participate in shard leader election at all.