On 8/18/2015 2:30 AM, Daniel Collins wrote:
> I think this is expected.  As Shawn mentioned, your hard commits have
> openSearcher=false, so they flush changes to disk, but don't force a
> re-open of the active searcher.
> By contrast softCommit, sets openSearcher=true, the point of softCommit is
> to make the changes visible so do to that you have to re-open a searcher.
> 
> Currently, most of the Solr Caches are searcher-based, so opening a new
> searcher means creating (and optionally warming) a new cache.  I know there
> is work in progress to make these caches more segment-based (which would
> lead to more re-use between searchers) but currently each commit would
> create a new set of caches.  You can "warm" those caches, but that's where
> the trade-off comes, warming a cache with records takes time and
> processing, so if you are committing frequently, the warming doesn't really
> have time to take effect.
> 
> https://wiki.apache.org/solr/SolrCaching explains this (probably better
> than me) and from that page, the DocumentCache can't be auto-warmed since
> DocIds can change between searchers.
> 
> 
> On 18 August 2015 at 06:19, Maulin Rathod <mrat...@asite.com> wrote:
> 
>> Hi Shawn,
>>
>>
>>
>> Thanks for your feedback.
>>
>> In our scenario documents are added frequently (Approx 10 documents added
>> in 1 minute) and we want to make it available for search near realtime
>> (within 5 second).  Even if we set  autosoftcommit 5 second (so that
>> document will be available for search after 5 second), it flushes all
>> documents from documentCache. Just wanted to understand if we are doing
>> something wrong or its solr expected behavior.

10 documents per minute won't even make Solr breathe hard.  Under the
right conditions, Solr can index thousands of documents per second.
Unless there are a very large number of of new documents, the length of
time that a commit takes usually has no correlation to the number of
documents that were added.  It has more to do with the number of
documents in the entire index, the total index size, and how you have
configured your cache warming.

Daniel has provided good information regarding how searchers and caches
interact.

Thanks,
Shawn

Reply via email to