Forum: Ferret A note about #search vs #search_each

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Neville B. (Guest)
on 2007-03-07 03:37
(Received via mailing list)
Hi,

I just "solved" an issue which I mentioned on this list many moons ago,
regarding searches somehow being serialized, such that a long search
would cause others to wait noticeably.

Anyhow, after coding both :limit and applying homegrown thread time
limit monitoring, I discovered that Searcher#search_each uses
rb_thread_critical = Qtrue whereas Searcher#search doesn't.

I changed my code to use TopDocs and Searcher#search and viola,
concurrent searches!

Cheers,

Nevill
This topic is locked and can not be replied to.