You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Justin <cr...@yahoo.com> on 2010/10/04 20:02:44 UTC

Updating documents with fields that aren't stored

Hi all,

The JavaDocs do not appear to mention that only stored fields persist 
IndexWriter.updateDocument. When opening new readers, from either 
IndexWriter.getReader or IndexReader.open, neither TermDocs nor IndexSearcher 
will find terms in fields which weren't stored.

Existing readers, however, do continue to find such terms after updateDocument 
has been called. At best, this is confusing. Is this a defect?

Thanks,
Justin


      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Updating documents with fields that aren't stored

Posted by Steven A Rowe <sa...@syr.edu>.
Yes, even for IW.getReader() - from <http://wiki.apache.org/lucene-java/NearRealtimeSearch>:

	Now Lucene offers a unified API where one calls getReader
	and any updates are immediately searchable.

I.e., the reader returned by getReader doesn't track updates; it too represents a shapshot in time.  It's just less costly to reopen.


> -----Original Message-----
> From: Justin [mailto:crynax@yahoo.com]
> Sent: Monday, October 04, 2010 2:15 PM
> To: java-user@lucene.apache.org
> Subject: Re: Updating documents with fields that aren't stored
> 
> Even for IndexWriter.getReader (near real-time)? "changes made during an
> IndexWriter session can be  quickly made available for searching without
> closing
> the writer nor calling commit(long)."
> 
> http://lucene.apache.org/java/3_0_2/api/all/org/apache/lucene/index/IndexW
> riter.html#getReader()
> 
> 
> 
> 
> 
> ----- Original Message ----
> From: Steven A Rowe <sa...@syr.edu>
> To: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
> Sent: Mon, October 4, 2010 1:05:36 PM
> Subject: RE: Updating documents with fields that aren't stored
> 
> This is not a defect:
> <http://wiki.apache.org/lucene-
> java/LuceneFAQ#Does_Lucene_allow_searching_and_indexing_simultaneously.3F>
> .
> 
> 
> > -----Original Message-----
> > From: Justin [mailto:crynax@yahoo.com]
> > Sent: Monday, October 04, 2010 2:03 PM
> > To: java-user@lucene.apache.org
> > Subject: Updating documents with fields that aren't stored
> >
> > Hi all,
> >
> > The JavaDocs do not appear to mention that only stored fields persist
> > IndexWriter.updateDocument. When opening new readers, from either
> > IndexWriter.getReader or IndexReader.open, neither TermDocs nor
> > IndexSearcher
> > will find terms in fields which weren't stored.
> >
> > Existing readers, however, do continue to find such terms after
> > updateDocument
> > has been called. At best, this is confusing. Is this a defect?
> >
> > Thanks,
> > Justin
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Updating documents with fields that aren't stored

Posted by Justin <cr...@yahoo.com>.
Even for IndexWriter.getReader (near real-time)? "changes made during an 
IndexWriter session can be  quickly made available for searching without closing  
the writer nor calling commit(long)."

http://lucene.apache.org/java/3_0_2/api/all/org/apache/lucene/index/IndexWriter.html#getReader()





----- Original Message ----
From: Steven A Rowe <sa...@syr.edu>
To: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
Sent: Mon, October 4, 2010 1:05:36 PM
Subject: RE: Updating documents with fields that aren't stored

This is not a defect: 
<http://wiki.apache.org/lucene-java/LuceneFAQ#Does_Lucene_allow_searching_and_indexing_simultaneously.3F>.


> -----Original Message-----
> From: Justin [mailto:crynax@yahoo.com]
> Sent: Monday, October 04, 2010 2:03 PM
> To: java-user@lucene.apache.org
> Subject: Updating documents with fields that aren't stored
> 
> Hi all,
> 
> The JavaDocs do not appear to mention that only stored fields persist
> IndexWriter.updateDocument. When opening new readers, from either
> IndexWriter.getReader or IndexReader.open, neither TermDocs nor
> IndexSearcher
> will find terms in fields which weren't stored.
> 
> Existing readers, however, do continue to find such terms after
> updateDocument
> has been called. At best, this is confusing. Is this a defect?
> 
> Thanks,
> Justin
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Updating documents with fields that aren't stored

Posted by Steven A Rowe <sa...@syr.edu>.
This is not a defect: <http://wiki.apache.org/lucene-java/LuceneFAQ#Does_Lucene_allow_searching_and_indexing_simultaneously.3F>.

> -----Original Message-----
> From: Justin [mailto:crynax@yahoo.com]
> Sent: Monday, October 04, 2010 2:03 PM
> To: java-user@lucene.apache.org
> Subject: Updating documents with fields that aren't stored
> 
> Hi all,
> 
> The JavaDocs do not appear to mention that only stored fields persist
> IndexWriter.updateDocument. When opening new readers, from either
> IndexWriter.getReader or IndexReader.open, neither TermDocs nor
> IndexSearcher
> will find terms in fields which weren't stored.
> 
> Existing readers, however, do continue to find such terms after
> updateDocument
> has been called. At best, this is confusing. Is this a defect?
> 
> Thanks,
> Justin
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org