Does solr support rollback or any method to do the same job?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Does solr support rollback or any method to do the same job?

zhenyuan wei
Hi all,
  Does solr support rollback or any method to do the same job?
Like update/add/delete a document, can I rollback them?

Best~
TinsWzy
Reply | Threaded
Open this post in threaded view
|

Re: Does solr support rollback or any method to do the same job?

Mikhail Khludnev-2
Surprisingly, you can delete recently added doc not yet committed doc,
Lucene tracks the sequence and after following commit there will be no that
document.
"To rollback" delete/update one need to send original doc. But literally
there'is no fine grained rollback operation.

On Tue, Sep 18, 2018 at 1:04 PM zhenyuan wei <[hidden email]> wrote:

> Hi all,
>   Does solr support rollback or any method to do the same job?
> Like update/add/delete a document, can I rollback them?
>
> Best~
> TinsWzy
>


--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Does solr support rollback or any method to do the same job?

Shawn Heisey-2
In reply to this post by zhenyuan wei
On 9/18/2018 4:03 AM, zhenyuan wei wrote:
>    Does solr support rollback or any method to do the same job?
> Like update/add/delete a document, can I rollback them?

With SolrCloud, rollback is not supported.  This is because a typical
SolrCloud install spreads the index across multiple servers.  Each
server has no idea what the other servers are doing as far as indexing. 
So rollback is disabled in cloud mode.

In standalone mode where each index core is a separate entity with no
connection to any others, you can do a rollback ... but it will NOT be
the document you just added/deleted/changed, it will be *EVERY* change
since the last searcher was opened.  Solr does not support transactions
like a database does.

https://lucene.apache.org/solr/guide/7_4/uploading-data-with-index-handlers.html#rollback-operations

Thanks,
Shawn