Re: Why suggestions can be that slow?

2015-01-12 Thread FiMko
Seems I know the answer. The example query from mentioned above page: 
http://localhost:8983/solr/techproducts/suggest?suggest=truesuggest.build=truesuggest.dictionary=mySuggesterwt=jsonsuggest.q=elec
http://localhost:8983/solr/techproducts/suggest?suggest=truesuggest.build=truesuggest.dictionary=mySuggesterwt=jsonsuggest.q=elec
  
each time rebuild the index. After I removed the suggest.build=true
parameter the query takes 5ms maximum now.

The page even warns: note, however, that you would likely not want to build
the index on every query so this just a lack of attention from me.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Why-suggestions-can-be-that-slow-tp4178944p4178948.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Why suggestions can be that slow?

2015-01-12 Thread Erick Erickson
Don't build it on every invocation. You only need to build the
suggester when a new searcher
is opened, i.e. omit suggest.build=true

Best,
Erick

On Mon, Jan 12, 2015 at 7:31 AM, FiMko fima-regi...@ya.ru wrote:
 Hi all,

 I'm experimenting with  Solr Suggester
 https://cwiki.apache.org/confluence/display/solr/Suggester  . I have
 configured the functionality as per the mentioned page. In my Solr
 collection I have 32607 documents. The SuggestComponent is configured to
 search suggestions through field of type text_auto as described below:

 schema.xml
 field name=srcphrase_autocomplete type=text_auto indexed=true
 stored=true multiValued=false /
 ...
 fieldType class=solr.TextField name=text_auto
   analyzer
 tokenizer class=solr.KeywordTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory/
   /analyzer
 /fieldType

 I'm able to receive the suggestions but Solr query execution time (QTime) is
 always above 900ms.
 The query:
 http://localhost:8983/solr/mycollection/suggest?suggest=truesuggest.build=truesuggest.dictionary=mySuggestersuggest.q=externa
 Solr ver.: 4.8.1
 PC: Windows 7 Pro, 8GB, 3.2GHz.

 Any ideas or suggestions on how to profile the query execution are very
 welcome!



 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Why-suggestions-can-be-that-slow-tp4178944.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Why suggestions can be that slow?

2015-01-12 Thread FiMko
Erick, thanks for the answer. You're absolutely right!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Why-suggestions-can-be-that-slow-tp4178944p4179007.html
Sent from the Solr - User mailing list archive at Nabble.com.