Tip: Type constrained searches

There’s a little known feature of the autocomplete search box in the Freebase header — its that you can pass along the type along with the string you’re looking for and it will limit your search to topics of that type.

For instance, say you are looking for any of the following:

If you simply type ‘Michael Jackson’ into the search box, you won’t find these results listed in auto-complete because they aren’t the 10 most relevant results for that string matching any type in the system. But there’s a nifty convention you can use to work around this…

Try inputting any of the following:

You’ll find that results in auto-complete and in search results are limited to matches of the type you specified. Enjoy!

2 Responses to “Tip: Type constrained searches”

  1. John Bäckstrand Says:

    That is awesome, but I wonder if I even need to point out that there should be support for more “google”esque searching for the types part, too.As in

    “Michael Jackson basketball” should notice that, oh, there is a michael jackson whos type (partially) matches basketball, and so on. It wont be as clear-cut that the user intends the basketball part to mean type, but even “type:basketball” would be much better than actually typing the while “type:/basketball/basketball_player” thing. Sub-autocomplete on the type maybe, but that sounds hairy

  2. danm Says:

    Thanks for the comment. Yes, there’s no doubt that the less the user needs to know when typing into a search box, the better — we thought we’d implement something useful if somewhat technical first and perhaps in the future we can better support either or both of the cases you suggest.

About

Freebase is a free database of the world's information. This is the official Freebase blog.