Querying an index while commiting/optimizing

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

Querying an index while commiting/optimizing

gonzoprosperity
This is more of a Lucene question than a Solr one, but... is it
possible to query a Solr(Lucene) index while it is in the middle of
performing a commit/optimize?

Some of the Lucene documentation *implies*, but on a logical level it
seems kind of crazy. But at the same time, for applications where it
takes 2 days to re-build your index it seems impractical that your app
is "down" this whole time...

Am I totally crazy?

thanks
/cody
Reply | Threaded
Open this post in threaded view
|

Re: Querying an index while commiting/optimizing

Yonik Seeley-2
On 4/19/07, Cody Caughlan <[hidden email]> wrote:
> This is more of a Lucene question than a Solr one, but... is it
> possible to query a Solr(Lucene) index while it is in the middle of
> performing a commit/optimize?

Yep, no problems.  You can query concurrently with adds, deletes,
commits, and optimizes.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Querying an index while commiting/optimizing

gonzoprosperity
Ok, cool. At the worse case, are you just not going to get any hits,
even though you "know" the data is in there, but it just hasnt been
indexed yet?

How does that work?

/cody

On 4/19/07, Yonik Seeley <[hidden email]> wrote:

> On 4/19/07, Cody Caughlan <[hidden email]> wrote:
> > This is more of a Lucene question than a Solr one, but... is it
> > possible to query a Solr(Lucene) index while it is in the middle of
> > performing a commit/optimize?
>
> Yep, no problems.  You can query concurrently with adds, deletes,
> commits, and optimizes.
>
> -Yonik
>
Reply | Threaded
Open this post in threaded view
|

Re: Querying an index while commiting/optimizing

Yonik Seeley-2
On 4/19/07, Cody Caughlan <[hidden email]> wrote:
> How does that work?

From the user perspective, you continue to "see" the previous version
of the index that was last committed until the current commit is
completely finished.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Querying an index while commiting/optimizing

gonzoprosperity
PERFECT.

Thanks guys/gals.

On 4/19/07, Yonik Seeley <[hidden email]> wrote:
> On 4/19/07, Cody Caughlan <[hidden email]> wrote:
> > How does that work?
>
> From the user perspective, you continue to "see" the previous version
> of the index that was last committed until the current commit is
> completely finished.
>
> -Yonik
>