lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: Lucene index in memcache
Date Mon, 02 Jul 2007 21:11:58 GMT
You can always read the current index into a RAMdir, but I really
wonder if that will make much of a difference, as your op system should
be taking care of this kind of thing for you.

How big is your index? What kind of performance are you
seeing? What else is running on that box?

I'd do some profiling to see where things are actually slow. In
particular, think about logging how long each query takes to
complete, just the Lucene part. I've seen similar situations
where the actual time was being taken *outside* of lucene
itself by XML manipulations, for instance.

Also, are you iterating over a Hits object for more than the top
100 entries? That would be very inefficient. Are you using a
collector and calling IndexReader.doc() inside the loop?

I'd *very* strongly recommend that you pinpoint where the
time is actually being spent before jumping to the conclusion
that using a RAMdir would fix your problem. I can't tell you how
many times I've been *sure* I knew where the bottleneck was
only to find out that it's someplace completely different.
You simply cannot reliably optimize performance without
really understanding where the time is being spent. Trust
me on this one <G>...

Some simple timings with System.currentTimeMilliseconds() will
tell you a lot.


On 7/2/07, Cathy Murphy <> wrote:
> Is there a way to store lucene index in memcache. During high traffic
> search
> becomes very slow. :(
> --
> Cathy

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message