Wikipedia has a auto-suggest feature on its search field. If you for instance type in "mars" it lists a few items including Mars, Marseille, Marsh. I am looking to implement something similar working off the latest DBpedia export (wikipedia in database form). If I do a search for all labels in the labels_en.nt file that DBpedia offer that begin with "mars" then, even if I remove ones that redirect on to others that are listed, I end up with a huge list.
In trying to understand how wikipedia does this I noticed that I'm actually querying this URL which returns a JSON string. Now my problem is that I don't know how wikipedia narrows the list down.
Perhaps it does so based on page popularity. The higher views/edits a page has the higher it goes in this suggestion box. If so, does DBpedia export this information?