Hi, I got your private email but will reply in public for everyones benefit.
I'm sure you can fine-tune various things in order to gain some ms. But my first and best advice to you is to increase the amount of RAM in your computer. Your computer is very weak and under-specced for use with search. I don't know your application's use and business value, but this looks more like a desktop computer than a production computer, and you cannot really measure performance on anything else than your target production environment. You say your index size is 1.4Gb which will double in future to 2.8Gb. Throw in 8Gb RAM in your server and allocate 2Gb for Java/Solr (-Xmx2g). The remaining 6Gb will be used by Windows and for disk caching your index. This will cause your entire index to be cached in RAM and you're not dependent on your (slow) disk for search. Aside from this, have you profiled what in your search takes the most time? Try to add &debugQuery=true and look at the timings section at the bottom of the resonse to see whether it's the query part or perhaps the highlighting part which spends the most time. How large are your PDF docs (text, not binary) on average? Also, newer versions of Solr may have optimizations for faster highlighting.. Another thing from your reqHandler config. You use "maxAnalyzedChars=-1". The correct should be hl.maxAnalyzedChars and this will only work for the original highlighter, not fvh. -- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com Solr Training - www.solrtraining.com On 10. feb. 2012, at 05:15, Rong Kang wrote: > Thanks for your reply. > > I didn't use any other params except q(for example > http://localhost:8080/solr/search?q=drugs). no facet, no sort. > I don't think configure newSearcher or firstSearcher can help, because I want > every query can be very fast. Do you have other solution? > I think 460ms is too slow even though a word is firstly searched. > > > My computer 's setting: > cpu: amd 5000, 2.2GHz, 1 cpu with 2 cores. > main memory: 2G, 800Mhz > disk drive : 7200r/min > > This is my full search configuration: > > > <requestHandler name="/search" > class="org.apache.solr.handler.component.SearchHandler"> > <lst name="defaults"> > <str name="wt">xslt</str> > <str name="tr">dismaxdoc.xsl</str> > <int name="maxAnalyzedChars">-1</int> > <str name="echoParams">all</str> > <str name="indent">off</str> > <str name="fl">filename</str> > <int name="rows">10</int> > <str name="defType">dismax</str> > <str name="qf">filename^5.0 text^1.5</str> > <str name="q.alt">*:*</str> > <str name="hl">on</str> > <str name="hl.fl">filename text</str> > <bool name="hl.useFastVectorHighlighter">true</bool> > <str name="hl.tag.pre"><![CDATA[<b style="color:red">]]></str> > <str name="hl.tag.post"><![CDATA[</b>]]></str> > <int name="hl.fragsize">100</int> > <int name="f.filename.hl.fragsize">100</int> > <str name="f.filename.hl.alternateField">filename</str> > <int name="f.text.hl.fragsize">100</int> > <int name="f.text.hl.snippets">3</int> > > </lst> > </requestHandler> > > > and my schema.xml > > > <fields> > <field name="text" type="text" indexed="true" multiValued="true" > termVectors="true" termPositions="true" termOffsets="true"/> > <field name="filename" type="filenametext" indexed="true" > required="true" termVectors="true" termPositions="true" termOffsets="true"/> > <field name="id" type="string" stored="true"/> > </fields> > <defaultSearchField>text</defaultSearchField> > <uniqueKey>id</uniqueKey> > <copyField source="filename" dest="text"/> > > > and > > > <fieldType name="filenametext" class="solr.TextField" > positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" > generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" > splitOnCaseChange="1"/> > <filter class="solr.LowerCaseFilterFactory"/> > <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" expand="true"/> > <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" > generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" > splitOnCaseChange="1"/> > <filter class="solr.LowerCaseFilterFactory"/> > <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> > </analyzer> > </fieldType> > <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt"/> > <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" > generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" > splitOnCaseChange="1"/> > <filter class="solr.LowerCaseFilterFactory"/> > <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" expand="true"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt"/> > <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" > generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" > splitOnCaseChange="1"/> > <filter class="solr.LowerCaseFilterFactory"/> > > <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> > </analyzer> > </fieldType> > > > At 2012-02-10 11:49:39,"Chris Hostetter" <hossman_luc...@fucit.org> wrote: >> >> : When I first search one word in solr . its response time is 460ms. When >> : I search the same word the second time. its response time is under 70ms. >> : I can't tolerate 460ms . Does anyone know how to improve performance? >> >> tell us more about the query itself -- what params did you use? did you >> sort? did you facet? >> >> (the only info you've given us so far is what defaults you configured in >> your handler, but not what params you used at query time) >> >> >> : and my search configuration >> : <str name="defType">dismax</str> >> : <str name="qf">filename^5.0 text^1.5</str> >> : >> : >> : <str name="q.alt">*:*</str> >> : <str name="hl">on</str> >> : <str name="hl.fl">filename text</str> >> : <bool name="hl.useFastVectorHighlighter">true</bool> >> : <str name="hl.tag.pre"><![CDATA[<b style="color:red">]]></str> >> : <str name="hl.tag.post"><![CDATA[</b>]]></str> >> : <int name="hl.fragsize">100</int> >> : <str name="f.filename.hl.alternateField">filename</str> >> : <int name="f.text.hl.snippets">3</int> >> >> -Hoss