lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas J. Buhr" <visual.lo...@gmail.com>
Subject Re: What are the best document edit options?
Date Thu, 18 Dec 2008 06:38:45 GMT
Steve,

Thanks for the helpful information, the addition of the new document  
methods makes things much better.

One more question, is there JSON support in Lucene? JSON is more fat- 
free compared to XML and would be preferred. Digester works well for  
indexing XML but something along the same lines for JSON would be  
even sweeter.

Cheers,

Thom


On 17-Dec-08, at 2:39 PM, Steven A Rowe wrote:

> Hi Thomas,
>
> On 12/17/2008 at 11:52 AM, Thomas J. Buhr wrote:
>> Where can I see how IndexWriter.updateDocument works without getting
>> into Lucene all over again until this important issue is resolved?
>> Is there a sample of its usage for updating specific fields in a
>> given document?
>
> The updateDocument() functionality was added to IndexWriter in  
> Lucene v2.1.0 under the aegis of LUCENE-565 <http:// 
> issues.apache.org/jira/browse/LUCENE-565>, and the discussion there  
> should help, especially the design overviews (more than one there -  
> look for Ning Li's 2006-12-18 comment: <http://issues.apache.org/ 
> jira/browse/LUCENE-565?focusedCommentId=12459506#action_12459506>).
>
> Several of Lucene's test cases invoke updateDocument(), e.g.  
> o.a.l.index.TestIndexWriterDelete.testOperationsOnDiskFull():
>
> <http://svn.apache.org/viewvc/lucene/java/tags/lucene_2_4_0/src/ 
> test/org/apache/lucene/index/TestIndexWriterDelete.java?view=markup>
>
>> Is the update immediate or delayed?
>
> My reading of the way this all works is that IndexWriter buffers  
> deletes and only writes them out to disk on flush, which can be  
> triggered by a commit.  An IndexReader over this index will only  
> see a single post-commit snapshot.  So there will be a delay: the  
> IndexWriter must perform a commit, and the IndexReader must be  
> closed and then opened again (or just reopen()'d, as of Lucene  
> v2.3.0).
>
> Steve
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message