lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <>
Subject Re: Lowering query time
Date Wed, 05 Feb 2014 01:11:40 GMT
I suspect faceting is the issue here. The actual query you have shown
seem to bring back a single document (or a single set of document for
a product):

On the other hand, you are asking for 4 field facets:
AND 2 range facets, both clustered/grouped:
facet.range=activePrice_l (e.g.

And for all facets you have asked to bring back ALL of the results:

Plus, you are doing a complex sort:
sort=popularity_i desc,popularity_i desc

So, you are probably spending quite a bit of time counting (especially
in a shared setup) and then quite a bit more sending the response

I would check the size of the result document (HTTP result) and see
how large it is. Maybe you don't need all of the stuff that's coming
back. I assume you are not actually querying Solr from the client's
machine (that is I hope it is inside your data centre close to your
web server), otherwise I would say to look at automatic content
compression as well to minimize on-wire document size.

Finally, if your documents have many stored fields (store=true in
schema.xml) but you only return small subsets of them during search,
you could look into using enableLazyFieldLoading flag in the

P.s. As others said, you don't seem to have too many documents.
Perhaps you want replication instead of sharding for improved
Personal website:
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD

On Wed, Feb 5, 2014 at 6:31 AM, Alexey Kozhemiakin
<> wrote:
> Btw "timing" for distributed requests are broken at this moment, it doesn't combine values
from requests to shards.  I'm working on a patch.
> -----Original Message-----
> From: Jack Krupansky []
> Sent: Tuesday, February 04, 2014 22:00
> To:
> Subject: Re: Lowering query time
> Add the debug=true parameter to some test queries and look at the "timing"
> section to see which search components are taking the time. Traditionally, highlighting
for large documents was a top culprit.
> Are you returning a lot of data or field values? Sometimes reducing the amount of data
processed can help. Any multivalued fields with lots of values?
> -- Jack Krupansky
> -----Original Message-----
> From: Joel Cohen
> Sent: Tuesday, February 4, 2014 1:43 PM
> To:
> Subject: Re: Lowering query time
> 1. We are faceting. I'm not a developer so I'm not quite sure how we're doing it. How
can I measure?
> 2. I'm not sure how we'd force this kind of document partitioning. I can see how my shards
are partitioned by looking at the clusterstate.json from Zookeeper, but I don't have a clue
on how to get documents into specific shards.
> Would I be better off with fewer shards given the small size of my indexes?
> On Tue, Feb 4, 2014 at 12:32 PM, Yonik Seeley <> wrote:
>> On Tue, Feb 4, 2014 at 12:12 PM, Joel Cohen <>
>> wrote:
>> > I'm trying to get the query time down to ~15 msec. Anyone have any
>> > tuning recommendations?
>> I guess it depends on what the slowest part of the query currently is.
>>  If you are faceting, it's often that.
>> Also, it's often a big win if you can somehow partition documents such
>> that requests can normally be serviced from a single shard.
>> -Yonik
>> - native off-heap filters and fieldcache for
>> solr
> --
> joel cohen, senior system engineer
> e p 212.944.8000 x276 bluefly, inc. 42 w. 39th st. new york, ny
10018 <> | *fly since
> 2013...*

View raw message