소스 검색

[search] Make timeline support timestamps with milliseconds

Romain Rigaux 11 년 전
부모
커밋
9afc8dabcf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/search/src/search/api.py

+ 1 - 1
apps/search/src/search/api.py

@@ -68,7 +68,7 @@ def _guess_range_facet(widget_type, solr_api, collection, facet_field, propertie
         gap = int((end - start) / SLOTS)
       if gap < 1:
         gap = 1
-    elif re.match('\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ', stat_facet['min']):
+    elif re.match('\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d?\d?)?Z', stat_facet['min']):
       is_date = True
       stats_min = stat_facet['min']
       stats_max = stat_facet['max']