This should answer your a) or b) question:

[otis@linux2 java]$ pwd
/mnt/disk2/cvs-repositories/jakarta/jakarta-lucene/src/java

[otis@linux2 java]$ which ffjg
alias ffjg='find . -type f -name \*.java|xargs grep'
        /usr/bin/find
        /usr/bin/xargs

[otis@linux2 java]$ ffjg Thread
./org/apache/lucene/store/Lock.java:       
Thread.sleep(sleepInterval);
[otis@linux2 java]$


Unoptimized index is not a problem for document additions, they take
constant time, regardless of the size of the index and regardless of
whether the index is optimized or not.
Searches of unoptimized index take longer than searches of an optimized
index.
Here's a test:
Write a class that indexes X documents where X is a substantial number.
Them make a copy of that index X and call it Y.  Optimize index Y.
Then do a search against one, and against the other index, and time it.
Then let us know which one is faster and by how much.

Good luck,
Otis



--- Leo Galambos <[EMAIL PROTECTED]> wrote:
> Hmmm. The question is what would I measure?
> 
> Otis, do you know what implementation is used in Lucene (I am lost in
> 
> hiearchy of readers/writers):
> 
> a) single thread for solving query
> b) more than one thread for a query
> 
> (a) would mean that Lucene could solve queries more than 50% slower
> than in case (b). It would also mean, that Lucene's index is in
> optimal
> state when just one segment exists. And it also means that if you
> remove
> half of documents from a collection you have to rebuild one big
> segment to
> a smaller one, and so on... It would cost a lot of CPU/HDD time.
> 
> So it looks like I would measure effect of random insert/remove 
> operations. The problem is, how often I would call optimize in the
> test?
> 
> Any thoughts?
> 
> -g-
> 
> On Tue, 26 Nov 2002, Otis Gospodnetic wrote:
> 
> > No tests, just intuition that it's faster to find something in 1
> file
> > than in 100 of them.  If you do some tests, I'd love to hear the
> real
> > numbers :)
> > 
> > Otis
> > 
> > --- Leo Galambos <[EMAIL PROTECTED]> wrote:
> > > Did you try any tests in this area? (figures, charts...)
> > > 
> > > AFAIK reader reads identical number of (giga)bytes. BTW, it could
> > > read
> > > segments in many threads. I do not see why it would be slower
> (until
> > > you
> > > do many delete()-s). If reader opens 1 or 50 files, it is still
> > > nothing.
> > > 
> > > -g-
> > > 
> > > On Tue, 26 Nov 2002, Otis Gospodnetic wrote:
> > > 
> > > > This was just mentioned a few days ago. Check the archives.
> > > > Not needed for indexing, good to do after you are done
> indexing, as
> > > the
> > > > index reader needs to open and search through less files.
> > > > 
> > > > Otis
> > > > 
> > > > --- Leo Galambos <[EMAIL PROTECTED]> wrote:
> > > > > How does it affect overall performance, when I do not call
> > > > > optimize()?
> > > > > 
> > > > > THX
> > > > > 
> > > > > -g-
> > > > > 
> > > > > 
> > > > > 
> > > > > --
> > > > > To unsubscribe, e-mail:  
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > 
> > > > 
> > > > 
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > > > http://mailplus.yahoo.com
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:  
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Reply via email to