If you use Freebase search to get matches for any entity by name, you will get results sorted by relevance score. Try for example Taj Mahal.
I'm trying to get similar results using Freebase data dumps, so in my database 'Taj Mahal' related topics would be sorted by relevance, i.e. building comes first, musician comes next and so on.
Is there any suggestions how to achieve this without querying Freebase search API?