I want to implement a true search engine into a PHP/MySQL project. Can anyone point me in the right direction as to what would be the optimal way to do something like this?
Such parameters could be:
- number of comments made
- number of likes on your profile
- geo distance from the end user
My real concern here is, search engines like Solr requires me to upload "documents"/data set. But since my data is "alive", should I constantly update the Solr documents every time user interacts on my website? In that case, it feels like a redundant database.
How does similar projects do?
In general your concern is right: being an inverted-index based engine, Solr relies on that "immutable" structure for offering its features.
On top of that, depending on your context, there a lot of things that mitigates this aspect. I suggest you to check the SolrCloud capabilities, especially the Near Real Time search. Also dynamic sharding could be another thing, but that really depends on your scenario.