News for hackers. Stuff that matters.
Re:HNSearch Feature Requests by thaumaturgy on Monday June 06, 2011 @05:35AM (#2624176)
Looks like items marked [dead] in HN will show up as zombie search results -- i.e., they get returned in the search results for the items collection but the discussion field is null.

For example: filter[fields][type]=comment&filter[fields][username]=pg

...the second result there has a null discussion field. Getting the submission title &etc. would be nice.

Re:HNSearch Feature Requests by andres on Monday June 06, 2011 @10:27PM (#2627661)
The 'discussion' attribute contains info about the discussion that the comment belongs to. In this case the parent discussion is [dead] so the value of 'discussion' is null. Unfortunately, we don't have access to submission titles for [dead] submissions.
Re:HNSearch Feature Requests by thaumaturgy on Tuesday June 14, 2011 @03:49AM (#2652149)
Is there a way to exclude values from search results in the ThriftDB API? i.e., say I want to,

    [filter][domain]=nytimes.com&[filter][username]!=ausername
...is there a way to do that? I tried the "exclude" operator after [username] and get an "internal server error" every time.
Re:HNSearch Feature Requests by andres on Tuesday June 14, 2011 @10:31AM (#2653077)
&filter[fields][domain]=nytimes.com&filter[queries][]=-username:ausername
Re:HNSearch Feature Requests by thaumaturgy on Tuesday June 14, 2011 @10:51AM (#2653202)
Great! Thanks.
Re:HNSearch Feature Requests by thaumaturgy on Tuesday June 14, 2011 @04:27AM (#2652241)
Argh. And also, is there any way to query ThriftDB for HN date ranges?
Re:HNSearch Feature Requests by andres on Tuesday June 14, 2011 @10:36AM (#2653112)
You can use strings to represent relative times:

&filter[fields][create_ts]=[NOW-5HOURS%20TO%20NOW]

or exact timestamps:

&filter[fields][create_ts]=[2011-06-01T05:00:00.00Z%20TO%202011-06-02T07:00:00.00Z]

or both:

&filter[fields][create_ts]=[2011-06-01T05:00:00.00Z%20TO%20NOW]

Re:HNSearch Feature Requests by thaumaturgy on Tuesday June 14, 2011 @10:50AM (#2653199)
Sweet! That's perfect. Thank you.