• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to make a search engine for an intranet

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am developing an intranet and need to make a search engine
a)for the database
b)for the web documents
i do not want to buy or use a product but make one myself.how should i go about it.which is the line of direction to work.
thanks beforehand.
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a rough idea for the website portion:
- Create a database of every URL on your net
- Your search app could then query the databse to get a url
- Then open a stream to the url and read in the html file
- Use a string (or stream?) tokenizer to go through every word
- Keep track of each occurrence of the desired keyword
- Output the result to the user
You could implement a servlet to do the actual work, this would make it easy to output results as an html page to the user
Anyone care to expand upon this?
------------------
  • Ryan Burgdorfer
  • Java Acolyte in
  • Columbus, OH USA
 
ryan burgdorfer
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The more I think about it, the more I realize that the engine would pretty much have to be implemented as a servlet.
Steps 2 thru 5 in my above post would be inside a loop, iterating once for every url in the database. Within that loop would be another loop to parse the html into separate words, and keep track of every occurrence of the keyword.
------------------
  • Ryan Burgdorfer
  • Java Acolyte in
  • Columbus, OH USA
 
manjeet singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much for your replies.i am working in this direction and will ask if i have any more queries.thank you once again
 
reply
    Bookmark Topic Watch Topic
  • New Topic