Conner Burnett
Conner Burnett

Reputation: 512

Website Search Engine non mysql

I am wondering what would be a good way to do a search engine. The person who asked me to create it does not use MySQL but wants their pages to be searchable. Sadly enough, yes they are still creating static pages, so what is the best way to go about creating a search engine?

Is there a way to list the sites and use get_meta_tags in php to look for keywords they have added for the page?

Upvotes: 2

Views: 601

Answers (1)

drew010
drew010

Reputation: 69927

Lucene search is a good candidate for implementing a site search. You can add webpages, PDF files, Word/Excel documents and more to your index and get a very fast and efficient search of all content with the ability to sort results by search relevancy.

There is a pure-PHP implementation of Lucene available in Zend_Search_Lucene. You can use the Zend Lucene classes as a standalone without requiring the entire Zend Framework. You can write code for adding files and documents to your index periodically (since updating the search index can be time consuming, it should be done on a schedule or on demand by the site owner). You can then have code that opens your search index and feeds search queries in to get results. The documentation referenced above has examples of all of this.

Apache Solr is also a possibility and is widely used. This is a Java server that has an API for indexing and searching which is implemented in many languages including PHP.

Upvotes: 1

Related Questions