Skip to content

Instantly share code, notes, and snippets.

@lbjay
Created October 19, 2010 14:59
Show Gist options
  • Save lbjay/634333 to your computer and use it in GitHub Desktop.
Save lbjay/634333 to your computer and use it in GitHub Desktop.
## IN THE PYTHON VIRTUALENV ##
In [1]: import pysolr
In [2]: conn = pysolr.Solr('http://adsset:8986/solr/fulltext')
In [3]: %timeit r = conn.search('galaxy', fl=['id'], rows=10)
1 loops, best of 3: 50 s per loop
## SAME THING OUTSIDE THE VIRTUALENV ##
In [3]: import pysolr
In [4]: conn = pysolr.Solr('http://adsset:8986/solr/fulltext')
In [5]: %timeit r = conn.search('galaxy', fl=['id'], rows=10)
100 loops, best of 3: 4.28 ms per loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment