当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Getting started with Solr based search engine

问题描述:

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?

  • search for users
  • users are ranked/sorted on a variety of parameters

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: