Developing a Search engine like application in PHP
Posted: Tue Jul 22, 2008 8:32 am
Hello Everybody,
This is Ravish tiwari, a developer in the field of PHP from India.
I’ve just got my first major project in PHP, and the project is to develop a Knowledge Base for my company.
The project is a search based repository like MSDN, IBM Red Book or Google. But unlike google this application will provide information access to end user from it repository based on user queries.
User will enter search term and app query the database and display the records, more or less like to Google. You can also say that I’ve to develop a search engine for our own uses, where data, its search and its presentation will our.
I am having problem in defining the architecture of the project, means should I develop this as pure File based project?, or as Pure Database project where all data reside in database and all searches are performed on the database? or should I use a combination of both File based and Database approach? Should I use a combination of pure file and XML based database approach? I am confused caz this project is going to be huge and I am having problem with architecture of the Project.
Some suggestions that have come to my way are:
1) File Based Approach:
a. Store all the data in files and perform search by using file handling. [this seems to be time consuming]
b. Store file name, title and related keywords in database and perform search on that
2) Database based Approach
a. Create a multi-level database model store all data in tables depending on there relevance.
b. Start searching for particular keyword right from the first level table to last level table for particular record.
c. Whenever a match is found redirect the to particular file.
3) XML approach
a. Here all data resides in XML and search is done by parsing the file
b. Or all data resides in XML and search is done on its reference that is found in the MySQL database when a match is found XML is sent to Client browser which in tern format it with XSL and display it
All these suggestion have increased my confusion, please tell me which one should I use. Please share your experiences with me, caz it can help me a lot.
This is Ravish tiwari, a developer in the field of PHP from India.
I’ve just got my first major project in PHP, and the project is to develop a Knowledge Base for my company.
The project is a search based repository like MSDN, IBM Red Book or Google. But unlike google this application will provide information access to end user from it repository based on user queries.
User will enter search term and app query the database and display the records, more or less like to Google. You can also say that I’ve to develop a search engine for our own uses, where data, its search and its presentation will our.
I am having problem in defining the architecture of the project, means should I develop this as pure File based project?, or as Pure Database project where all data reside in database and all searches are performed on the database? or should I use a combination of both File based and Database approach? Should I use a combination of pure file and XML based database approach? I am confused caz this project is going to be huge and I am having problem with architecture of the Project.
Some suggestions that have come to my way are:
1) File Based Approach:
a. Store all the data in files and perform search by using file handling. [this seems to be time consuming]
b. Store file name, title and related keywords in database and perform search on that
2) Database based Approach
a. Create a multi-level database model store all data in tables depending on there relevance.
b. Start searching for particular keyword right from the first level table to last level table for particular record.
c. Whenever a match is found redirect the to particular file.
3) XML approach
a. Here all data resides in XML and search is done by parsing the file
b. Or all data resides in XML and search is done on its reference that is found in the MySQL database when a match is found XML is sent to Client browser which in tern format it with XSL and display it
All these suggestion have increased my confusion, please tell me which one should I use. Please share your experiences with me, caz it can help me a lot.