Click here to Skip to main content
14,732,936 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi everyone, this site has been helpful in resolving most of my faced issues and here i am having a issue which still is unresolved.

Let me explain what my goal is and what my program does, so far.

As per my research any search engine mostly checks the meta data keywords in a html file to match the user given input..

Example of meta data tag with keywords.

<meta name="Keywords" content="home,index,default">


As per my above example, if user tries to search the home page and enters "home" in the search box my program should search the string "home" in "content" in the meta tag named "keywords"

Now coming to what i have achived.

My program is able to

-->>Collect HTML files in a given folder.

-->>Search the meta tag named "keywords" and read the "content" of the tag in each html file.

-->>Matches against the user given input and when it finds the input existing in any html files. It populates them in a list.
Example of the program

Say user searches for "company". There are two html files having the content as "company" in meta data of keywords. Now these two html file paths are collected into a list.

I hope am clear till this point.

Now the issues am facing

-->> we can use google custom search or bing's. But am not allowed to use any third party inventories in this website.

-->>say if user searches for "exam" and say html files have the tag as "examination", my program is unable to catch the part of the tag to match user given input.

-->>I could only get the files in a specified folder but how can i point to the files of the server?

-->>So far am able to get only the url's to the files but i want to show the title and a little content of that page as a preview to the user. Something like what google shows when searched.

http://www.ineedhits.com/free-tools/blog/uploaded_images/google-search-705938.gif[^]

-->>As to above example, i have only the links in green but i wanna have the title's in blue and the content in black

However i haven't attempted for any optimization as this is only a small website search engine, i'd however be gld to know what can i do for the optimization of the searches taking place.

I hope am not making you guys go crazy with my needs of the program.

Thanks for your time and please do reply.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900