Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: How a search engine works?
12-03-2008, 10:35 AM #1
How a search engine works?
I imagine if I "create" and "storage", for example, 1,000 web pages in my database can I considerate that as a "short search engine"?
My question is: As the user will find the information in that search engine:
1. Must I index all 1,000 pages creating:
1a. a table with indexes
1b. other table with links and contents of each webpage
The user will retrieve information based on keywords from indexed table that will redirect it for the requested web pages.
2. retrieve information directly from webpages storaged based on keywords input by the user.
12-03-2008, 07:13 PM #2
- Join Date
- Jun 2003
- Cottage Grove, Minnesota
- Thanked 1,096 Times in 1,087 Posts
Normally a database contains the information to dynamically generate the web pages.
That means you don't have 1000 pages, you one PHP (or server-side script) that reads
data from the database and generates the web pages.
For example, this forum that you're looking at right now, is basically one PHP script that
is reading the content, the posts, the users, etc. from a MySQL database. It knows where
to find the data in the database based on the number in the URL (t=153486).
There are no static web pages. The PHP script builds the page you're seeing now and
sends it to your browser. Every page on this forum is generated the same way.
With that, the search is done upon the database itself.
So, you'll have to expand on what you mean by 1000 pages in your database.
Last edited by mlseim; 12-03-2008 at 07:16 PM.