twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

Not possible to remove start_time from query #53

Closed roback closed 8 years ago

roback commented 8 years ago

It's currently not possible to set Query#start_time and #end_time to nil. If you have set either #start_time or #end_time and want to run the same query, but this time on the whole index, you should be able to remove the time filter.

I realised this when writing twingly/twingly-search-api-python#25

roback commented 8 years ago

A test:

> query.start_time = Time.parse("2016-03-01 10:00:00")
=> 2016-03-01 10:00:00 +0100
> query.start_time = nil
Twingly::Search::QueryError: Not a Time object
from /Users/mattias/repos/twingly-search-api-ruby/lib/twingly/search/query.rb:71:in `start_time='
>
dentarg commented 8 years ago

Nice catch