Hi Frank,

Why your assertion fails because addOrUpdate() method doesn't work
properly. The method is called INDEX_LIMIT times in populateIndex()
for loop, but the index is newly created every time due to CREATE_NEW
flag at the IndexWriter constructor:

>     protected void addOrUpdate(Document doc) throws IOException
>     {
>         IndexWriter indexWriter = null;
>         Analyzer analyzer = new StandardAnalyzer();
> 
>         try {
>             indexWriter = new IndexWriter(directory, analyzer, 
> CREATE_NEW);
>             indexWriter.addDocument(doc);
>         } finally {
>             indexWriter.close();
>         }
>     }

You may want to move the code to setUp() method.

Hope this helps,

Koji




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

Reply via email to