Filter out submissions where url is null

57 views
Skip to first unread message

Leonel Togniolli

unread,
Jun 5, 2011, 5:08:41 PM6/5/11
to hnse...@googlegroups.com
I've been trying to filter out submissions where url is null without much luck. Any hints?

Zack Maril

unread,
Jun 5, 2011, 5:23:02 PM6/5/11
to hnse...@googlegroups.com
Maybe :
&boosts[filters][url:]

Or 

&filter[url][] ?

andres

unread,
Jun 5, 2011, 6:13:38 PM6/5/11
to HNSearch
You can't filter on null values.

The reason for that is because ThriftDB sets attribute values to null
by default so null values are effectively undefined. The logic behind
that has to do with ThriftDB's flexible schema. I'd be happy to go
into more detail about that if you're interested.

One way around this is to treat empty urls as empty strings instead of
None. ThriftDB indexes everything that isn't null so you should be
able to filter on an empty string. I'm somewhat swamped so let me know
what the priority level is for that?

Andres

On Jun 5, 5:23 pm, Zack Maril <zma...@tamu.edu> wrote:
> Maybe :
> &boosts[filters][url:]
>
> Or
>
> &filter[url][] ?
>

Leonel Togniolli

unread,
Jun 5, 2011, 6:31:54 PM6/5/11
to hnse...@googlegroups.com
Not that important. It would be nice to have.

Sol Eun

unread,
Nov 10, 2012, 12:35:36 AM11/10/12
to hnse...@googlegroups.com
I achieved this by doing &filter[queries][]=-url:http*
This will filter out any url entries with http.
Reply all
Reply to author
Forward
0 new messages