> > Is there a better way to do this or a work around for this lag on the
> > first search query?
>
> You may want to ask [email protected], the Lucene user mailing list,
> where you can get expert advice on Lucene usage issues.

Thanks Andi. Further investigation has pointed out that the sort query
on an index builds two sorted arrays. These are then cached in memory
(FieldCache) so further requests using the same sort willl be quick.

The solution to my problem is to use a separate thread to perform a
search before loading the new IndexSearcher into my twisted server. I
tried this (twisted.internet.threads.deferToThread) but it resulted in
a core dump.

Some googling has shown threads with PyLucene and Twisted has been
achieved with Chandler
(http://wiki.osafoundation.org/bin/view/Journal/TedLeung20040827), but
I know little about Chandler and am not particularly keen on adding
bits and pieces of Chandler just to get this working.

Is there a simple solution to have PyLucene and Twisted talk nicely
with threads?

Cheers,
Chris
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to