Wild card and fuzzy queries are in general expensive to compute for the
simple reason that the number of query combinations that solr has to check
against increases.
So the lesser amount of combinations solr has to try, the faster it'll be.
I believe that this is what you're seeing.

Additionally, if you're going to be using wildcard and/or fuzzy searches to
match different forms of a word like run or running etc. I suggest you use
stemming or lemmatization. This will be much faster.

On Tue, 16 Feb 2016, 10:34 Shahzad Masud <
shahzad.ma...@northbaysolutions.net> wrote:

> Thanks Binoy, these links helps. Explain or debug log really helped me, and
> after few experimentation and debugging, I conclude that if we move wild
> card queries (marked with *) to right; it improves performance. I haven't
> been able to find a reference in documentation, but does this statement
> holds true.
>
> Shahzad
>
> On Mon, Feb 15, 2016 at 12:40 PM, Binoy Dalal <binoydala...@gmail.com>
> wrote:
>
> > There is another resource to help analyze your queries: splainer.io
> >
> > As for query tuning, that is a really vast topic and there is no
> > straightforward answer. You'll have to experiment and find the settings
> > that suit you best.
> > Here's a few resources to help you get started:
> > http://wiki.apache.org/lucene-java/ImproveSearchingSpeed
> > https://wiki.apache.org/solr/SolrPerformanceProblems
> > https://wiki.apache.org/solr/SolrPerformanceFactors
> >
> > On Mon, 15 Feb 2016, 12:41 Shahzad Masud <
> > shahzad.ma...@northbaysolutions.net> wrote:
> >
> > > Thank you Binoy. Is there any pointer available to tune similar
> queries,
> > as
> > > it is taking a huge amount of time?
> > >
> > > Shahzad
> > >
> > > On Mon, Feb 15, 2016 at 10:18 AM, Binoy Dalal <binoydala...@gmail.com>
> > > wrote:
> > >
> > > > Append &debugQuery=true to your query.
> > > > It isn't exactly like a SQL execution plan but will give you the
> > details
> > > of
> > > > how the query was parsed, scored and how much time was taken by each
> > > module
> > > > used by the request handler.
> > > >
> > > > On Mon, 15 Feb 2016, 10:42 Shahzad Masud <
> > > > shahzad.ma...@northbaysolutions.net> wrote:
> > > >
> > > > > Please pardon my ignorance, but just wanted to check if there is
> > > anything
> > > > > like explain plan while executing query on Solr. I have one query
> > which
> > > > is
> > > > > taking a lot of time (56-68 seconds) with very huge network
> activity.
> > > > While
> > > > > most of queries are taking less than 4 seconds.
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> {!surround}<Contents:~(25,^(5,|("personal","private"),^(10,"loan",~(25,|("master*","chef*"),|(^(1,"american",^(1,"idol","samir")),|("ocean",|("eleven",|("ocean*","twelve*"))))))),|(^(1,"you","see*"),|("me!",|("nine",|("ten",|(^(2,"eleven","twelve"),|("pirates*","carribean")))))))>
> > > > >
> > > > > I have masked all text values in the query, while real values does
> > > exists
> > > > > separately resulting in around 10-300 msec.
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> {!surround}<Contents:&(~(5,"test","milestone"),&(~(5,"benstock",|("monumental","dinner")),"highway"))>
> > > > > = returning in almost 10 msec
> > > > >
> > > > > Shahzad
> > > > >
> > > > --
> > > > Regards,
> > > > Binoy Dalal
> > > >
> > >
> > --
> > Regards,
> > Binoy Dalal
> >
>
-- 
Regards,
Binoy Dalal

Reply via email to