Axel Gerke
unread,Feb 27, 2011, 6:24:08 AM2/27/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to solrpy
hi there,
I'm using solrpy from pypi in version 0.9.4. Since I've testing it,
I'm wondering about the query-time:
Here's my Code with debug-output:
....
print "Getting query: %s \r" % query
begin = time.time()
response = solr_conn.query(solr_query % query)
print "found %s results in %2f ms! \r" % (len(response.results),
((time.time() - begin) * 1000))
(yes, I know result is only the first batch ;-) )
....
The result:
Getting query: geld (german word for money)
found 13 results in 74.988842 ms!
The logfile from solr says (QTime is the query time in miliseconds):
INFO: [pegasus] webapp=/solr_dev path=/select
params={fl=*,score&q=SearchableText:(geld)&wt=standard&version=2.2}
hits=13 status=0 QTime=26
If I query now two or more times the same word one after another, you
can see in the solr-logfile, that solr's cache is activated (QTime=0
miliseconds) but the solrpy-query-time is still varying:
Python Query result:
Getting query: geld
found 13 results in 9.368896 ms!
Getting query: geld
found 13 results in 79.813957 ms!
Getting query: geld
found 13 results in 49.443960 ms!
Getting query: geld
found 13 results in 59.473038 ms!
The logfile from solr says (QTime is the query time in miliseconds):
27.02.2011 14:14:25 org.apache.solr.core.SolrCore execute
INFO: [pegasus] webapp=/solr_dev path=/select
params={fl=*,score&q=SearchableText:(geld)&wt=standard&version=2.2}
hits=13 status=0 QTime=0
27.02.2011 14:14:39 org.apache.solr.core.SolrCore execute
INFO: [pegasus] webapp=/solr_dev path=/select
params={fl=*,score&q=SearchableText:(geld)&wt=standard&version=2.2}
hits=13 status=0 QTime=0
27.02.2011 14:14:45 org.apache.solr.core.SolrCore execute
INFO: [pegasus] webapp=/solr_dev path=/select
params={fl=*,score&q=SearchableText:(geld)&wt=standard&version=2.2}
hits=13 status=0 QTime=0
27.02.2011 14:14:53 org.apache.solr.core.SolrCore execute
INFO: [pegasus] webapp=/solr_dev path=/select
params={fl=*,score&q=SearchableText:(geld)&wt=standard&version=2.2}
hits=13 status=0 QTime=0
Got any idea, why the querytime is varying at the solrpy query?