Thanks for the quick reply, and sorry for the stupid mistake. I have
it working now, in many cases. Here's an example that doesn't work:
That should, as I understand it, find this
http://news.ycombinator.com/item?id=2686580. But I think I don't have
a good understanding of the query field. Would you be able to explain
why that query doesnt work?
Thanks,
Paul
--
Paul Biggar
paulbiggar.com
@paulbiggar
Right. So it seems there are redirects, and the HN submission wasn't a
canonical URL. (Similarly, the #6445794 at the end is a problem).
> 2) the item does not match on a fulltext query for "stackoverflow"
> When you use the "q" url argument, ThriftDB searches across all indexed
> fields for a match. In this case, "stackoverflow" doesn't match any field
> but "stackoverflow.com" does:
> http://api.thriftdb.com/api.hnsearch.com/items/_search?q=stackoverflow.com&filter[fields][url]=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F6441218%2Fc-local-variable-can-be-accessed-outside-its-scope%2F6445794%236445794&pretty_print=true&filter[fields][type]=submission&sortby=create_ts%20desc&limit=1
> The string "stackoverflow" only appears in the item in the context of the
> "domain" attribute and the "url" attribute:
> http://api.thriftdb.com/api.hnsearch.com/items/2686580-0f445?pretty_print=true
> However, those attributes are StringTypes which means the search engine will
> only match on the full string, not words within the string:
> http://api.thriftdb.com/api.hnsearch.com/items?pretty_print=true
Great, thanks for the explanation. I think I understand the model well
enough to fix my problems now.
Thanks!
Paul