Open & Close Reader

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

Open & Close Reader

DECAFFMEYER MATHIEU
Open & Close Reader

Hi,

I need to merge indexes,
if I want the user to see the changes (the merged indexes), I heard I need to close the index reader and re-open it again.

But I will need to do this avery x minutes for some reasons,
So I wondered what could happen if user does a query just when a re-open of the reader has been done.

Thank you.

__________________________________
   Matthew



============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice.
============================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Open & Close Reader

Michael McCandless-2

<[hidden email]> wrote:

> I need to merge indexes,
> if I want the user to see the changes (the merged indexes), I heard I
> need to close the index reader and re-open it again.

Yes.  More generally, whenever there have been changes to an index
that you want your readers/searchers to see, you need to re-open the
reader/searcher.  A reader keeps a "point in time" view of the index
as of when it was open, and will not show any changes until it is
re-opened.

> But I will need to do this avery x minutes for some reasons,
> So I wondered what could happen if user does a query just when a re-open
> of the reader has been done.

I don't really understand this question -- could you provide more
detail here?

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Open & Close Reader

DECAFFMEYER MATHIEU
My question is what happen when a re-opening of the reader occurs and in
the same time a user does a query on the index ? And are there solutions
for this.

__________________________________
   Matt

   

-----Original Message-----
From: Michael McCandless [mailto:[hidden email]]
Sent: Thursday, February 22, 2007 12:48 PM
To: [hidden email]
Subject: Re: Open & Close Reader

*****  This message comes from the Internet Network *****


<[hidden email]> wrote:

> I need to merge indexes,
> if I want the user to see the changes (the merged indexes), I heard I
> need to close the index reader and re-open it again.

Yes.  More generally, whenever there have been changes to an index
that you want your readers/searchers to see, you need to re-open the
reader/searcher.  A reader keeps a "point in time" view of the index
as of when it was open, and will not show any changes until it is
re-opened.

> But I will need to do this avery x minutes for some reasons,
> So I wondered what could happen if user does a query just when a
re-open
> of the reader has been done.

I don't really understand this question -- could you provide more
detail here?

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice.
============================================


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open & Close Reader

Erick Erickson
Well, it's your logic that takes the request from the user and executes the
search. So it's your logic that has to take care of any coordination between
threads that use the same reader. This is a standard multi-threading
resource-sharing issue.

If your application is not multi-threaded, I don't see how you can "close
the reader while the user is executing a query"...

Erick

On 2/22/07, DECAFFMEYER MATHIEU <[hidden email]> wrote:

>
> My question is what happen when a re-opening of the reader occurs and in
> the same time a user does a query on the index ? And are there solutions
> for this.
>
> __________________________________
>    Matt
>
>
>
> -----Original Message-----
> From: Michael McCandless [mailto:[hidden email]]
> Sent: Thursday, February 22, 2007 12:48 PM
> To: [hidden email]
> Subject: Re: Open & Close Reader
>
> *****  This message comes from the Internet Network *****
>
>
> <[hidden email]> wrote:
>
> > I need to merge indexes,
> > if I want the user to see the changes (the merged indexes), I heard I
> > need to close the index reader and re-open it again.
>
> Yes.  More generally, whenever there have been changes to an index
> that you want your readers/searchers to see, you need to re-open the
> reader/searcher.  A reader keeps a "point in time" view of the index
> as of when it was open, and will not show any changes until it is
> re-opened.
>
> > But I will need to do this avery x minutes for some reasons,
> > So I wondered what could happen if user does a query just when a
> re-open
> > of the reader has been done.
>
> I don't really understand this question -- could you provide more
> detail here?
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ============================================
> Internet communications are not secure and therefore Fortis Banque
> Luxembourg S.A. does not accept legal responsibility for the contents of
> this message. The information contained in this e-mail is confidential and
> may be legally privileged. It is intended solely for the addressee. If you
> are not the intended recipient, any disclosure, copying, distribution or any
> action taken or omitted to be taken in reliance on it, is prohibited and may
> be unlawful. Nothing in the message is capable or intended to create any
> legally binding obligations on either party and it is not intended to
> provide legal advice.
> ============================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Open & Close Reader

DECAFFMEYER MATHIEU
Actually I don't see how it could not be multi-threaded,
since it seems normal to me that I run it in a web application which is
multi-threaded for each user request ?

Erick, could u please explain to me your comment ?

Thank u.

__________________________________
   Matt

   

-----Original Message-----
From: Erick Erickson [mailto:[hidden email]]
Sent: Thursday, February 22, 2007 2:06 PM
To: [hidden email]
Subject: Re: Open & Close Reader

*****  This message comes from the Internet Network *****

Well, it's your logic that takes the request from the user and executes
the
search. So it's your logic that has to take care of any coordination
between
threads that use the same reader. This is a standard multi-threading
resource-sharing issue.

If your application is not multi-threaded, I don't see how you can
"close
the reader while the user is executing a query"...

Erick

On 2/22/07, DECAFFMEYER MATHIEU <[hidden email]> wrote:
>
> My question is what happen when a re-opening of the reader occurs and
in
> the same time a user does a query on the index ? And are there
solutions

> for this.
>
> __________________________________
>    Matt
>
>
>
> -----Original Message-----
> From: Michael McCandless [mailto:[hidden email]]
> Sent: Thursday, February 22, 2007 12:48 PM
> To: [hidden email]
> Subject: Re: Open & Close Reader
>
> *****  This message comes from the Internet Network *****
>
>
> <[hidden email]> wrote:
>
> > I need to merge indexes,
> > if I want the user to see the changes (the merged indexes), I heard
I

> > need to close the index reader and re-open it again.
>
> Yes.  More generally, whenever there have been changes to an index
> that you want your readers/searchers to see, you need to re-open the
> reader/searcher.  A reader keeps a "point in time" view of the index
> as of when it was open, and will not show any changes until it is
> re-opened.
>
> > But I will need to do this avery x minutes for some reasons,
> > So I wondered what could happen if user does a query just when a
> re-open
> > of the reader has been done.
>
> I don't really understand this question -- could you provide more
> detail here?
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ============================================
> Internet communications are not secure and therefore Fortis Banque
> Luxembourg S.A. does not accept legal responsibility for the contents
of
> this message. The information contained in this e-mail is confidential
and
> may be legally privileged. It is intended solely for the addressee. If
you
> are not the intended recipient, any disclosure, copying, distribution
or any
> action taken or omitted to be taken in reliance on it, is prohibited
and may
> be unlawful. Nothing in the message is capable or intended to create
any

> legally binding obligations on either party and it is not intended to
> provide legal advice.
> ============================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice.
============================================


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Open & Close Reader

Chris Hostetter-3
: Actually I don't see how it could not be multi-threaded,
: since it seems normal to me that I run it in a web application which is
: multi-threaded for each user request ?

every application in the world is not a web application.

if you are dealing with multiple threads, you will need to o something to
ensure that threads don't try to use an IndexReader refrence while you are
in the middle of closing it and assigning a new IndexReader to it ... you
can do this with synchronization for example.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]