lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Robinson <>
Subject Querying through SolrJ taking lot of time
Date Thu, 03 Mar 2016 09:21:04 GMT
I am running the following query on an index that has around 123 million
records, using SolrJ..
Each record has only 5 fields.

String *qry*="( fieldA:(value1 OR value2 OR .... value24) AND
fieldB:(value1 OR value2 OR value3 OR value4 OR value5) )
(...basically a simple AND of 2 ORs)

When I hit directly from browser QTime is in the range of 300 - 400 milli
secs max.

But when I run through SolrJ my (endtime - starttime) gives 20 seconds max
(when run on a machine with 16 CPUs and 60GB RAM with heap size 25G
When run on my laptop which has only 4GB RAM the SolrJ  (endtime -
starttime) gives 60s to a maximum of 90s sometimes.

Why could this huge difference in timing be when queried using SolrJ.

Also could you please suggest on how I can get the timing close to the
timing I see when I hit the index directly from browser.
Note:- All programs (java as well as SOLR) reside on the same machine in
both cases (more powerful machine as well as laptop) when I tried.

When I tried with the more powerful machine I even gave firstSearcher
q=*:*, but no impact was seen.

I am looking for good response times from my first query itself. So I did
not explore much on caching.

Any help is greatly appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message