Sometimes I think people forget how capable computers are. 500k is not much. You can just slap that in a Lucene instance. This is a solved problem.
Approaching search by just tossing the data in Lucene is how you end up with Confluence's search box though.
Approaching search by just tossing the data in Lucene is how you end up with Confluence's search box though.