RE: When does IndexReader pick up changes?

2004-07-29 Thread Aviran
IndexReader will pick the changes as it is opened. 
If new documents are added to the index you need to open a new IndexReader
in order for it to pick up the changes

Aviran

-Original Message-
From: Stephane James Vaucher [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 0:00 AM
To: Lucene Users List
Subject: Re: When does IndexReader pick up changes?


IIRC, if you use a searcher, changes are picked up right away. With a
reader, I would expect it should react the same way.

disclaimerI'm not a lucene guru, I might be wrong/disclaimer Where I'm
less sure is with a FSDirectory, as it uses an internal RAMDirectory. If two
separate processes (within the same classloader, FS with same paths are
reused) use different FSDirectories, you might notice a flushing behaviour.

sv

On 28 Jul 2004 [EMAIL PROTECTED] wrote:

 Hi,

 Does anyone know if the IndexWriter has to be closed for an 
 IndexReader to pick up the changes?

 Thanks.

 --- Lucene Users List [EMAIL PROTECTED]
 wrote:
 Hi,
 
  If I do this:
 
- open index writer
- add document

- open reader
- search with reader
- close reader
- close
 writer
 
  Will the reader pick up the document that
  was added to the
 index since it was opened
  after the document was added?  Or will it
 
 only pick up changes that occur after
  the index writer is closed?
 
  Thanks for the help!


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does IndexReader pick up changes?

2004-07-29 Thread Aviran
AFAIK you don't have to close the writer

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 11:17 AM
To: [EMAIL PROTECTED]
Subject: RE: When does IndexReader pick up changes?


Yes, I understand that the IndexReader only picks up changes once it is
opened.  I'm just trying to determine whether the IndexWriter first needs to
be closed or if that is not necessary.

--- Lucene Users List [EMAIL PROTECTED]
wrote:
IndexReader will pick the changes as it is opened. 
 If new documents
are added to the index you need to open a new IndexReader
 in order for
it to pick up the changes
 
 Aviran
 
 -Original Message-

 From: Stephane James Vaucher [mailto:[EMAIL PROTECTED]
 Sent: Thursday,
July 29, 2004 0:00 AM
 To: Lucene Users List
 Subject: Re: When does IndexReader
pick up changes?
 
 
 IIRC, if you use a searcher, changes are picked
up right away. With a
 reader, I would expect it should react the same way.

 
 disclaimerI'm not a lucene guru, I might be wrong/disclaimer Where
I'm
 less sure is with a FSDirectory, as it uses an internal RAMDirectory.
If two
 separate processes (within the same classloader, FS with same paths
are
 reused) use different FSDirectories, you might notice a flushing 
 behaviour.

 
 sv
 
 On 28 Jul 2004 [EMAIL PROTECTED] wrote:
 
  Hi,
 
  Does anyone know if the IndexWriter has to be closed
for an 
  IndexReader to pick up the changes?
 
  Thanks.
 

 --- Lucene Users List [EMAIL PROTECTED]
  wrote:
 
Hi,
  
   If I do this:
  
 - open index writer
  
  - add document
 
 - open reader
 - search with reader

 - close reader
 - close
  writer
  
   Will the
reader pick up the document that
   was added to the
  index since
it was opened
   after the document was added?  Or will it
  
 
only pick up changes that occur after
   the index writer is closed?
  
   Thanks for the help!
 
 
  
  -

  To unsubscribe, e-mail: [EMAIL PROTECTED]

 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For
additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For
additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does IndexReader pick up changes?

2004-07-29 Thread yahootintin . 1247688
Thanks for the info!



--- Lucene Users List [EMAIL PROTECTED]
wrote:

AFAIK you don't have to close the writer

 

 -Original Message-

 From: [EMAIL PROTECTED]

 [mailto:[EMAIL PROTECTED]


 Sent: Thursday, July 29, 2004 11:17 AM

 To: [EMAIL PROTECTED]

 Subject: RE: When does IndexReader pick up changes?

 

 

 Yes, I understand
that the IndexReader only picks up changes once it is

 opened.  I'm just
trying to determine whether the IndexWriter first needs to

 be closed or
if that is not necessary.

 

 --- Lucene Users List [EMAIL PROTECTED]

 wrote:

 IndexReader will pick the changes as it is opened. 

  If new
documents

 are added to the index you need to open a new IndexReader


 in order for

 it to pick up the changes

  

  Aviran

  

  -Original
Message-

 

  From: Stephane James Vaucher [mailto:[EMAIL PROTECTED]

  Sent: Thursday,

 July 29, 2004 0:00 AM

  To: Lucene Users List

  Subject: Re: When does IndexReader

 pick up changes?

  

  


 IIRC, if you use a searcher, changes are picked

 up right away. With a

  reader, I would expect it should react the same way.

 

  

  disclaimerI'm
not a lucene guru, I might be wrong/disclaimer Where

 I'm

  less sure
is with a FSDirectory, as it uses an internal RAMDirectory.

 If two

 
separate processes (within the same classloader, FS with same paths

 are

  reused) use different FSDirectories, you might notice a flushing 


 behaviour.

 

  

  sv

  

  On 28 Jul 2004 [EMAIL PROTECTED]
wrote:

  

   Hi,

  

   Does anyone know if the IndexWriter
has to be closed

 for an 

   IndexReader to pick up the changes?


 

   Thanks.

  

 

  --- Lucene Users List [EMAIL PROTECTED]

   wrote:

  

 Hi,

   

If I do this:

   

 
- open index writer

   

   - add document

  

  -
open reader

  - search with reader

 

  - close reader

  - close

   writer

   

Will the

 reader pick
up the document that

was added to the

   index since

 it was
opened

after the document was added?  Or will it

   

  

 only pick up changes that occur after

the index writer is closed?

   

Thanks for the help!

  

  

   

   -

 

   To unsubscribe, e-mail: [EMAIL PROTECTED]

 

  For additional commands, e-mail: [EMAIL PROTECTED]

 

 

  

  

  -

 

  To unsubscribe, e-mail: [EMAIL PROTECTED]

  For

 additional commands, e-mail: [EMAIL PROTECTED]

  

  

  

  

  -

 

  To unsubscribe, e-mail: [EMAIL PROTECTED]

  For

 additional commands, e-mail: [EMAIL PROTECTED]

  

  

 

 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]

 For
additional commands, e-mail: [EMAIL PROTECTED]

 

 

 

 

 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]

 For
additional commands, e-mail: [EMAIL PROTECTED]

 

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When does IndexReader pick up changes?

2004-07-28 Thread yahootintin . 1247688
Hi,



Does anyone know if the IndexWriter has to be closed for an IndexReader
to pick up the changes?



Thanks.



--- Lucene Users List [EMAIL PROTECTED]
wrote:

Hi,

 

 If I do this:

 

   - open index writer

   - add document

   - open reader

   - search with reader

   - close reader

   - close
writer

 

 Will the reader pick up the document that 

 was added to the
index since it was opened

 after the document was added?  Or will it 


only pick up changes that occur after

 the index writer is closed?

 

 Thanks for the help!

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When does IndexReader pick up changes?

2004-07-28 Thread Stephane James Vaucher
IIRC, if you use a searcher, changes are picked up right away. With a
reader, I would expect it should react the same way.

disclaimerI'm not a lucene guru, I might be wrong/disclaimer
Where I'm less sure is with a FSDirectory, as it uses an internal
RAMDirectory. If two separate processes (within the same classloader,
FS with same paths are reused) use different FSDirectories, you
might notice a flushing behaviour.

sv

On 28 Jul 2004 [EMAIL PROTECTED] wrote:

 Hi,

 Does anyone know if the IndexWriter has to be closed for an IndexReader
 to pick up the changes?

 Thanks.

 --- Lucene Users List [EMAIL PROTECTED]
 wrote:
 Hi,
 
  If I do this:
 
- open index writer
- add document

- open reader
- search with reader
- close reader
- close
 writer
 
  Will the reader pick up the document that
  was added to the
 index since it was opened
  after the document was added?  Or will it
 
 only pick up changes that occur after
  the index writer is closed?
 
  Thanks for the help!


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]