4 ms·
I was surprised to learn that the search API returns hits on usernames when they appear outside of the post/comment content. I'm looking now to see if there's
by sant0sk1 15y ago
I was surprised to learn that the search API returns hits on usernames when they appear outside of the post/comment content.
I'm looking now to see if there's an easy way to filter around it. I've also been emailing with one of the ThriftDB guys and I'll ask him as well.
If not, it'd be very difficult to filter those out because I'm not currently (nor would I want to) retrieving all the matching items, just the number of hits.
- solipsist 15y agoOh yes, I forgot you were using the HNSearch API. By the way, I hope you win the API Contest (don't they decide tomorrow?). You for sure get my vote!
- sant0sk1 15y agoAwesome, thanks! The voting starts tomorrow. Do come back and participate ;)
- qF 15y agoThis is actually pretty easy to do! You can apply weights to fields, so just apply 0.0 to the username field - or that's how I did it anyway. Your entry looks very nice, cool to see others had a similar idea. :)