lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trent" <jtr...@structsoft.com>
Subject Re: Strange behavior indexing 1000 documents in RAMDirectory
Date Sat, 10 Nov 2001 14:49:55 GMT
I was wondering if there is more documentation surrounding RAMDirectory?
There is essentially no documentation in the javadoc for the Directory
classes or how to apply them effectively in your application.

Does it make sense to index a large collection of documents using a
temporary RAMDirectory and then merging with primary index directory? Does
anyone have code examples they can share to illustrate?  I've only been
developing using Lucene for a little while now...

thanks,
jeff


----- Original Message -----
From: "Paul Friedman" <pfriedman@macromedia.com>
To: <lucene-user@jakarta.apache.org>
Sent: Friday, November 09, 2001 5:26 PM
Subject: Strange behavior indexing 1000 documents in RAMDirectory


> While comparing RAMDirectory vs FSDirectory indexing performance I ran
across some strange behavior.  If I try to add 1000 documents using the
RAMDirectory and then write it to disk, the search fails to find any
documents.  However, running the exact same test with any other number of
documents seems to work fine.
>
> I have attached a test case that attempts to add/search 500, 999, 1000,
1001, 2000, 5000 documents to both a RAMDirectory and FSDirectory and then
searches for the documents.  Notice in the following test output that the
RAMDirectory test using 1000 documents fails to find any documents, all
other tests work fine.
>
> D:\Dev\Test Tools\lucene>java -cp %CLASSPATH%;.\ RAMWriterTest
>
> Index and search 500 documents
> RAMDirectory: indexed 500 in 1656 msec
> RAMDirectory indexing: search 500 in 125 msec
> FSDirectory: indexed 500 in 4157 msec
> FSDirectory indexing: search 500 in 78 msec
>
> Index and search 999 documents
> RAMDirectory: indexed 999 in 1953 msec
> RAMDirectory indexing: search 999 in 31 msec
> FSDirectory: indexed 999 in 7797 msec
> FSDirectory indexing: search 999 in 235 msec
>
> Index and search 1000 documents
> RAMDirectory: indexed 1000 in 1891 msec
> RAMDirectory indexing: search 0 in 15 msec
> FSDirectory: indexed 1000 in 8485 msec
> FSDirectory indexing: search 1000 in 31 msec
>
> Index and search 1001 documents
> RAMDirectory: indexed 1001 in 1797 msec
> RAMDirectory indexing: search 1001 in 16 msec
> FSDirectory: indexed 1001 in 8484 msec
> FSDirectory indexing: search 1001 in 32 msec
>
> Index and search 2000 documents
> RAMDirectory: indexed 2000 in 3594 msec
> RAMDirectory indexing: search 2000 in 16 msec
> FSDirectory: indexed 2000 in 16875 msec
> FSDirectory indexing: search 2000 in 31 msec
>
> Index and search 5000 documents
> RAMDirectory: indexed 5000 in 8641 msec
> RAMDirectory indexing: search 5000 in 31 msec
> FSDirectory: indexed 5000 in 42375 msec
> FSDirectory indexing: search 5000 in 78 msec
>
>
> Can anybody explain this?
>
> Thanks.
> Paul
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message