You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2020/06/25 18:55:20 UTC

[lucene-solr] branch branch_8x updated: SOLR-14307: add enabled parameter to cache documents; typos in common-query-parameters in cache section

This is an automated email from the ASF dual-hosted git repository.

ctargett pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 3fc9d0f  SOLR-14307: add enabled parameter to cache documents; typos in common-query-parameters in cache section
3fc9d0f is described below

commit 3fc9d0fa01020436c8597a567af522dd74f4dedd
Author: Cassandra Targett <ca...@lucidworks.com>
AuthorDate: Wed Jun 24 14:39:13 2020 -0500

    SOLR-14307: add enabled parameter to cache documents; typos in common-query-parameters in cache section
---
 solr/solr-ref-guide/src/common-query-parameters.adoc      | 7 +++----
 solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc | 2 ++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/solr/solr-ref-guide/src/common-query-parameters.adoc b/solr/solr-ref-guide/src/common-query-parameters.adoc
index c80178a..6c2b00a 100644
--- a/solr/solr-ref-guide/src/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/src/common-query-parameters.adoc
@@ -268,9 +268,7 @@ You can also use the `cost` option to control the order in which non-cached filt
 
 For very high cost filters, if `cache=false` and `cost>=100` and the query implements the `PostFilter` interface, a Collector will be requested from that query and used to filter documents after they have matched the main query and all other filter queries. There can be multiple post filters; they are also ordered by cost.
 
-For most queries the default behavior is `cost=0` -- but some types of queries such as `{!frange}` default to `cost=100`, because they are most efficient when used as a `PostFilter`.
-
-For example:
+For most queries the default behavior is `cost=0`, but some types of queries (such as `{!frange}`) default to `cost=100`, because they are most efficient when used as a `PostFilter`.
 
 This is an example of 3 regular filters, where all matching documents generated by each are computed up front and cached independently:
 
@@ -280,7 +278,8 @@ fq=quantity_in_stock:[5 TO *]
 fq={!frange l=10 u=100}mul(popularity,price)
 fq={!frange cost=200 l=0}pow(mul(sum(1, query('tag:smartphone')), div(1,avg_rating)), 2.3)
 
-These are the same filters run w/o caching.  The simple range query on the `quantity_in_stock` field will be run in parallel with the main query like a traditional Lucene filter, while the 2 `frange` filters will only be checked against each document has already matched the main query and the `quantity_in_stock` range query -- first the simpler `mul(popularity,price)` will be checked (because of its implicit `cost=100`) and only if it matches will the final very complex filter (with its  [...]
+These are the same filters run without caching.
+The simple range query on the `quantity_in_stock` field will be run in parallel with the main query like a traditional Lucene filter, while the 2 `frange` filters will only be checked against each document has already matched the main query and the `quantity_in_stock` range query -- first the simpler `mul(popularity,price)` will be checked (because of its implicit `cost=100`) and only if it matches will the final very complex filter (with its higher `cost=200`) be checked.
 
 [source,text]
 q=some keywords
diff --git a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
index e65f41e..c6eb229 100644
--- a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
@@ -59,6 +59,8 @@ Each cache implementation also supports a `maxIdleTime` attribute that controls
 
 `FastLRUCache` and `LFUCache` support `showItems` attribute. This is the number of cache items to display in the stats page for the cache. It is for debugging.
 
+All caches can be disabled using the parameter `enabled` with a value of `false`. Caches can also be disabled on a query-by-query basis with the `cache` parameter, as described in the section <<common-query-parameters.adoc#cache-parameter,cache Parameter>>. 
+
 Details of each cache are described below.
 
 === filterCache