Skip to content

Commit

Permalink
* add parens
Browse files Browse the repository at this point in the history
  • Loading branch information
whym committed Mar 26, 2012
1 parent 0d4ebda commit 2bbb2e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trend_query.py
Expand Up @@ -48,9 +48,9 @@ def format_query(querystr, options):
if options.start and not options.end:
options.end = 'Z' # some value lexicographically greater than any year
if options.start and options.end:
querystr += ' timestamp:[%s TO %s]' % (options.start, options.end)
querystr = '(%s) timestamp:[%s TO %s]' % (querystr, options.start, options.end)
if options.namespace:
querystr += ' namespace:' + options.namespace
querystr = '(%s) namespace:%s' % (querystr, options.namespace)

return {'q': querystr, 'max_revs': options.maxrevs, 'collapse_hits': 'day' if options.daily else 'month', 'fields': ['rev_id'] if options.revisions else []}

Expand Down

0 comments on commit 2bbb2e4

Please sign in to comment.