I would say that you'd use C++ (or Java I prefer C though) for the actual searching portion. Maybe like a command line interface. ./search [options] query_terms or something that returns a reusable interface and I assume you're going to have the application usable from the web so you could use something like php to call it.
Keep in mind that doing direct calls can be dangerous because you could get injected. i.e. shell_exec("./search query; rm -rf /") so that may be where you'd want to be real careful.
I love python but I feel like you don't necessarily need it in this case. Of course there are infinitely many possibilities for this kind of thing.