Search Engine help

T

Ted Zlatanov

I am currently constructing a small search facility in perl for a
website i am creating, and have become quite confused on a couple of
things.

the datafile will be something like below;

Name|Area|Website|etc...

My main confusion is when a user does a search and i wish to display
the results to the user, i take it that i need to create a temporary
page, so how do i create a temporary page to display the results in
(when creating the temporary page how do i ensure that another user
searching doesn't get the same temporary file as another user that
is currently searching) and clear it up when the user closes his
browser or leaves the site?

Hope i explained my self well enough :)

If I understand you correctly, you should consider using a database
table to hold things to be searched (web site areas? HTML pages?
URLs?) and creating indices on the search keys (keywords, names,
areas, etc.). Then, you can write a very simple Class::DBI script to
do on-the-fly searching without using any intermediate data files.

The key thing is that you have to update the database table when web
site data is updated. You can do this with scheduled updates, or by
triggering an update every time the web site pages are modified.

I am assuming here that you want to write your own search, and are
not interested in any of the existing solutions; if that's not true
then definitely look at the free searching software out there before
you write your own. This is a problem that may be easily solved for
you without writing custom code.

Ted
 
N

No Name

Hi,

I am currently constructing a small search facility in perl for a website i
am creating, and have become quite confused on a couple of things.

the datafile will be something like below;

Name|Area|Website|etc...

My main confusion is when a user does a search and i wish to display the
results to the user, i take it that i need to create a temporary page, so
how do i create a temporary page to display the results in (when creating
the temporary page how do i ensure that another user searching doesn't get
the same temporary file as another user that is currently searching) and
clear it up when the user closes his browser or leaves the site?

Hope i explained my self well enough :)

Thanks for your time and patience.

N.Name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top