lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Collins <danwcoll...@gmail.com>
Subject Re: Does soft commit re-opens searchers in disk?
Date Mon, 04 Jan 2016 14:29:18 GMT
If you have already done a soft commit and that opened a new searcher, then
the document will be visible from that point on.  The results returned by
that searcher cannot be changed by the hard commit (whatever that is doing
under the hood, the segment that has that document in must still be visible
to the searcher).  I don't know exactly how the soft commit stores its
segment, but there must be some kind of reference counting like there is
for disk segments since the searcher has that "segment" open (regardless of
whether that segment is in RAM or on disk).

On 4 January 2016 at 14:05, Emir Arnautovic <emir.arnautovic@sematext.com>
wrote:

> Hi Gili,
> Visibility is related to searcher - if you reopen searcher it will be
> visible. If hard commit happens without reopening searcher, documents will
> not be visible till next soft commit happens.
> You can find more details about commits on
> https://lucidworks.com/blog/2013/08/23/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/
>
> HTH,
> Emir
>
>
> On 04.01.2016 11:14, Gili Nachum wrote:
>
>> Hello,
>>
>> When a new document is added, it becomes visible after a soft commit,
>> during which it is written to a Lucene RAMDirectory (in heap). Then after
>> a
>> hard commit, the RAMDirectory is removed from memory and the docs are
>> written to the index on disk.
>> What happens if I hard commit (write to disk) with openSearcher=false.
>> Would I lose document visibility? since it's no longer in memory AND the
>> hard commit didn't open a new searcher on disk?
>>
>> Does soft commit also re-opens Searchers over the index on disk?
>>
>> Here's my commit configuration:
>>
>> <autoCommit>
>>        <maxTime>600000</maxTime>
>> *    <openSearcher>false</openSearcher>*
>> </autoCommit>
>> <autoSoftCommit>
>>       <maxTime>${solr.autoSoftCommit.maxTime:30000}</maxTime>
>>    </autoSoftCommit>
>>
>> Thanks.
>>
>>
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message