The Blog

Building a Better Search Query

Posted on December 10, 2014 by

Many factors can affect streaming data relevancy. When the data you consume isn’t ordered by relevancy, rather by the time it was crawled, getting the relevant posts is essential. I would like to share with you a few tips you can use to highly increase the relevancy of the data you consume via API


  • Add more keywordsIf the keyword you are using is too generic, like let’s say “Apple”, and you are searching for Apple products, you can add multiple keywords describing those products like (iPhone OR iPad OR MacBook). This will bring back posts mentioning both “Apple” and one or more of the mentioned products.
  • Search in specific sections: A great way of retrieving relevant posts, without having to create exhausting muti-keyword queries, is by searching for posts posted in certain sections of a site. For example, searching for posts about restaurants is easy as:
    This will limit the results to be under sections which contain the keyword “restaurants” in the section name. You can also use Boolean queries in the “thread.section_title” field, as well as to combine it with other filters.
  • Search in post’s title: Although very restrictive, this method will bring back the most relevant results as the keywords you are searching for, will appear in the title of the article/thread/blog post.
  • Other filters: On top of the mentioned techniques, you can also apply simple filters like source type (news/blogs/forums), language and even to limit the search to specific sites.

If you have another tip/trick, let me know in the comments and I will share it with our readers.

Share this:
Share on FacebookTweet about this on TwitterPin on PinterestShare on LinkedInShare on TumblrShare on Google+

This entry was posted in Technology. Bookmark the permalink.

One thought on “Building a Better Search Query”

  1. Jonas says:

    A trick I like working with JSON APIs in general is to use which transforms the JSON response into CSV. Then I can parse the data how I wish in the familliarity of a spreadsheet without writing a piece of code.

Leave a Reply

Your email address will not be published. Required fields are marked *