Yes, it's possible to run optimize on a live index. I wouldn't though, see:
https://lucidworks.com/2017/10/13/segment-merging-deleted-documents-optimize-may-bad/

Lucene has _never_ guaranteed proper functioning of an index created
with version X-2 with
version X. It hasn't been super-obvious, but we had a long discussion
about it on here:

https://issues.apache.org/jira/browse/LUCENE-8264

but here's the most succinct statement of why upgrading more than one
major version isn't
really possible from Robert Muir:

"I think the key issue here is Lucene is an index not a database.
Because it is a lossy index and does not retain all of the user's
data, its not possible to safely migrate some things automagically."

So Lucene labors heroically to maintain 1 version back-compat, but
that's all that's guaranteed.

So I'd _really_ recommend you reindex if at all possible.

Best,
Erick

Best,
Erick
On Thu, Aug 23, 2018 at 11:45 PM <dami...@gmail.com> wrote:
>
> Shawn, Is it possible to run optimize on the live collection? For example,
> /solr/collection/update?commit=true&optimize=true
>
> On Wed, 22 Aug 2018 at 06:50, Shawn Heisey <apa...@elyograg.org> wrote:
>
> > On 8/21/2018 2:29 AM, Artjoms Laivins wrote:
> > > We are running Solr cloud with 3 nodes v. 6.6.2
> > > We started with version 5 so we have some old index that we need safely
> > move over to v. 7 now.
> > > New data comes in several times per day.
> > > Our questions are:
> > >
> > > Should we run IndexUpgrader tool on one slave node that is down or it is
> > safe to run it while Solr is running and possible updates of the index are
> > coming?
> > > If yes, when we start it again will leader update this node with new
> > data only or will it overwrite index?
> >
> > It might not be possible to upgrade two major versions like that, even
> > with IndexUpgrader.  There is only a guarantee of reading an index
> > ORIGINALLY written by the previous major version.
> >
> > Even if it's possible to accomplish an upgrade, it is strongly
> > recommended that you index from scratch anyway.
> >
> > You cannot run IndexUpgrader while Solr has the index open.  The index
> > must be completely closed.  You cannot update an index while it is being
> > upgraded.
> >
> > Thanks,
> > Shawn
> >
> >

Reply via email to