Skip to content

Commit

Permalink
[ckan#2353] remove regex, update pysolr version
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed Apr 24, 2016
1 parent fbb557d commit 762c686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions ckan/lib/search/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,10 @@ def make_connection(decode_dates=True):
return pysolr.Solr(solr_url)


SOLR_DATETIME_REGEX = re.compile(
'''
^(?P<year>\d{4})
-(?P<month>\d{2})
-(?P<day>\d{2})
T(?P<hour>\d{2})
:(?P<minute>\d{2})
:(?P<second>\d{2})(\.\d+)?Z$
''',
re.VERBOSE
)


def solr_datetime_decoder(d):
for k, v in d.items():
if isinstance(v, basestring):
possible_datetime = re.search(SOLR_DATETIME_REGEX, v)
possible_datetime = re.search(pysolr.DATETIME_REGEX, v)
if possible_datetime:
date_values = possible_datetime.groupdict()
for dk, dv in date_values.items():
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PasteDeploy==1.5.2
PasteScript==2.0.2
pbr==0.11.1 # via sqlalchemy-migrate
psycopg2==2.4.5
pysolr==3.3.0
pysolr==3.4.0
Pygments==2.1
Pylons==0.9.7
python-dateutil==1.5
Expand Down

0 comments on commit 762c686

Please sign in to comment.