[web] searching html pages

Started by
5 comments, last by ballack 19 years, 1 month ago
hi everyone i have done a tutorial using html.This tutorial has many pages and many topics. now i want to include search options in my program so that a person who wants to read about certain topic can type it and search for it ,my program should list all the pages related to the keywords he has given. can anyone help me and tell me how can i include this search option? thank u in advance.
Advertisement
Are you thinking about something like the article search on this site? I think you should look into the google search tech, that is pretty popular. Ive never used this, so I am not sure if you need a database or what.

But if worse comes to worse, you could make anchor tags to each important part at the top of the page. Not terribly elegant, but whatever works.
Sure is a big 'ol world.
Do you have access to server-side scripting?
Quote:Original post by ballacki have done a tutorial using html.This tutorial has many pages and many topics.
now i want to include search options in my program so that a person who wants to read about certain topic can type it and search for it ,my program should list all the pages related to the keywords he has given.

can anyone help me and tell me how can i include this search option?


If you can wait for Google to index it, you can just add a Google search bar to your site that only returns results for your site. That's the easy way, and probably the best. Otherwise you could attempt to set up some other search engine system such as Apache Lucene.
Free Mac Mini (I know, I'm a tool)
thank you all for replying,

i am using a scripting language.

i am doing this tutorial as a project.and i want to write the search engine myself.

is there any way using scripting language i can process the html tags.

for eg: can i read what's in the META tag and list that page if it matches
the user's text.
html is a markup language.
You cannot search in html.

&#106avascript + vbscript == You can search.

Go and make up an index table, with rankings (how often there used) ("Index.html COntains word "The", ranking 7)

You then go and per word (and modifyer).
If its just a word on its own, assume its and.
+ = And
- = not
| = or

This is for a simplish system (you can get much simler and much more complex).

On the first word, look up in the index table, and mark an array with which pages have the words (you have an array which is your indexes, as well as a second aray which runs this. marking = Turning the bool to true).

When you hit an or, you go and you mark each page that is on the one following.

When you hit and, then you remove marks that are not common, to the array already there, and to the next words's index.

When you hit not, then for that words index, where the index is marked, you unmark it.

Now you find all the marked words, and you shove them in an array, sorted by ranking. You then go and process this (make it look 'nice') before giving it to the user.

Its a little hard to explain. Then again..... i'm not particularly good at explaining when i'm like this, arn't i?

Its better if you have one copy of it, then you load each page with a tag like &;lthscript language="vbscript" src="Search.vbs" /&;gth

In each page, so you go and you change search.vbs once when you add a new page.

From,
Nice coder
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

i am really sorry i could not understand it
can you simplify it and explain

This topic is closed to new replies.

Advertisement