You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Boole.Z.Guo (mis.cnsh04.Newegg) 41442" <Bo...@newegg.com> on 2013/11/05 05:44:29 UTC

The first search is slow

Hi,
I am using solr4.3.1.
When I search something, the first time is too slow. How can I improve this?

[cid:image001.png@01CEDA11.6F0AA1B0]
   The first time search


[cid:image002.png@01CEDA11.6F0AA1B0]
   The second time search

Best Regards,
Boole Guo
Software Engineer, NESC-SH.MIS
+86-021-51530666*41442
Floor 19, KaiKai Plaza, 888, Wanhangdu Rd, Shanghai (200042)
ONCE YOU KNOW, YOU NEWEGG.
CONFIDENTIALITY NOTICE: This email and any files transmitted with it may contain privileged or otherwise confidential information. It is intended only for the person or persons to whom it is addressed. If you received this message in error, you are not authorized to read, print, retain, copy, disclose, disseminate, distribute, or use this message any part thereof or any information contained therein. Please notify the sender immediately and delete all copies of this message. Thank you in advance for your cooperation.
保密注意:此邮件及其附随文件可能包含了保密信息。该邮件的目的是发送给指定收件人。如果您非指定收件人而错误地收到了本邮件,您将无权阅读、打印、保存、复制、泄露、传播、分发或使用此邮件全部或部分内容或者邮件中包含的任何信息。请立即通知发件人,并删除该邮件。感谢您的配合!


Re: The first search is slow

Posted by "michael.boom" <my...@yahoo.com>.
First time you run a query it's always slower, because it reads data from
disk.
After the first query, caches are built and stored in RAM memory, so the
second run of that query will hit caches and be sensibly faster.

To change how slow the first query is, play around with you firstSearcher
and newSearcher queries (see the example solrconfig.xml for more details)
Following link should provide you some more info on caching and what you can
do to improve the performance of your first query.
http://wiki.apache.org/solr/SolrCaching

If your hardware and setup allows it, you can try a trick, putting the
contents of your index in RAM directly:
cat .../<core>/data/index/* >/dev/null 



-----
Thanks,
Michael
--
View this message in context: http://lucene.472066.n3.nabble.com/The-first-search-is-slow-tp4099316p4099347.html
Sent from the Solr - User mailing list archive at Nabble.com.