Reputation: 9436
I have a high-traffic news website that I need to add a search feature to. I need something that's free or cheap, can add new news stories immediately to search results, handle high traffic, and allow for customized styling of results. I looked at Google Custom Search and it didn't seem like a good option because you have to pay for high traffic and they don't add new news articles immediately unless I paid to index them every time an article is added.
Does anyone know of either a different search API that would meet my needs or better yet, a library or script of some sort I could use? For example, does Sphinx, Lucene, Solr, etc. have the capability to index web pages? If so, would this have huge data requirements that would make my Amazon Web Services bill skyrocket? What's the best solution?
Upvotes: 0
Views: 208
Reputation: 33401
If they are all just a bunch of text files, you can use elasticsearch with the attachment plugin to index those text files.
However, be aware that it is not a simple case of plug and play. You will need to write some code that grabs those text files, and then indexes then into elastic search.
You will also have to write some code so that everytime a page is updated or added, a call is made to elasticsearch's webservice to index or update it.
Elasticsearch uses a REST API, so you can interact with it easily using CURL, just like any ordinary webservice. There are also PHP libraries out there to simplify interaction. Data is sent and received in JSON.
I think elastic search would be a good fit here, but give it a try and play around with it to see how it works.
Upvotes: 1