lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Otis Gospodnetic (JIRA)" <j...@apache.org>
Subject [jira] Closed: (LUCENE-521) Documents do not get added from RAMDirectory to FSDirectory if documents is less than 10.
Date Thu, 16 Mar 2006 19:27:58 GMT
     [ http://issues.apache.org/jira/browse/LUCENE-521?page=all ]
     
Otis Gospodnetic closed LUCENE-521:
-----------------------------------

    Resolution: Invalid

> Documents do not get added from RAMDirectory to FSDirectory if documents is less than
10.
> -----------------------------------------------------------------------------------------
>
>          Key: LUCENE-521
>          URL: http://issues.apache.org/jira/browse/LUCENE-521
>      Project: Lucene - Java
>         Type: Bug
>   Components: Index
>     Versions: 1.9
>  Environment: Windows XP, J2EE 1.4
>     Reporter: Keith Morgan

>
> Disk index does not get updated unless 10 or more documents exist in a RAM directory.
> Below is the code used:
> //Adding documents to RAMDirectory
> RAMDirectory ramDirectory = new RAMDirectory();
> IndexWriter ramWriter = new IndexWriter(ramDirectory, new StandardAnalyzer(), true);
> ......code looping and adding docs to IndexWriter
> ramWriter.addDocument(doc);
> WriteIndex.writeRAMDirectory(ramDirectory);
> //Sending RAMDirectory to Disk
> public static void writeRAMDirectory(RAMDirectory ramDirectory) {
>      boolean exists = IndexReader.indexExists(indexDir);
>      IndexWriter diskWriter = new IndexWriter(indexDir, new StandardAnalyzer(), !exists);
>      diskWriter.setMergeFactor(1000);
>      diskWriter.setMaxMergeDocs(10000);
>      diskWriter.addIndexes(new Directory[] { ramDirectory });
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message