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 FiMko <fi...@ya.ru> on 2015/01/12 16:31:32 UTC
Why suggestions can be that slow?
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=true&suggest.build=true&suggest.dictionary=mySuggester&suggest.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?
Posted by FiMko <fi...@ya.ru>.
Seems I know the answer. The example query from mentioned above page:
http://localhost:8983/solr/techproducts/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&wt=json&suggest.q=elec
<http://localhost:8983/solr/techproducts/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&wt=json&suggest.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?
Posted by FiMko <fi...@ya.ru>.
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.
Re: Why suggestions can be that slow?
Posted by Erick Erickson <er...@gmail.com>.
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 <fi...@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=true&suggest.build=true&suggest.dictionary=mySuggester&suggest.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.