some questions about search code
Results 1 to 5 of 5

Thread: some questions about search code

  1. #1
    Blast From the Past
    Join Date
    Jan 2003
    Posts
    729

    some questions about search code

    hey all

    im currently making a site and its going well so far but i cant seem to find some code for a web search.

    i will plan on learning how to make it myself but i plan to have this site up by xmas and dont no if il have enough time to learn

    but i would still like to know how to make it so if someone could point me in the direction of some good books i would be very happy

    happy holidays
    work it harder, make it better, do it faster, makes us stronger

  2. #2
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,914
    Hey Hey,

    Just a few ideas... on how you could do it.. nothing concrete and no books..

    1. SQL Database... 2 Fields.. URL and Description... just do a select like <whatever users typed>.. fill in spaces with % or * or whatever...

    2. If it's just your internal pages... how about just calling grep and parsing the results? grep "user string" *

    I realize these probably aren't what you are looking for... and they're dirty.. but it would work as a quick fix.

    Peace,
    HT
    IT Blog: .:Computer Defense:.
    PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".

  3. #3
    Senior Member
    Join Date
    Oct 2001
    Posts
    786
    What do you have avaliable to make your search feature work? Dynamic website, or static website? ( Server-side Code or no? )


    A long time ago there were people coding a search system in Javascript. It was quite simple really - an array of pages linked to an array of keywords. Matching a keyword would return that page. Unfortunately since the client had to download everything including the database of pages, these had to be quite small, and by not hitting a keyword there would be no results... (This also suffers from larger databases being much slower than smaller ones to search)

    Anyways, you might look into that. If you have content that moves (lots of new content), some other method would need to be developed, but it is basically the same. On the server-side front, coding something to effeciently generate keywords from content is probably another topic in itself...


    (How google does it is anyone's guess. But from what I've heard they use Pigeons)

  4. #4
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    Speaking of Google: You could use Google Search on your website.
    http://www.google.com/services/websearch.html

    The Google Free Websearch will let you search your own domain or the entire web.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  5. #5
    Blast From the Past
    Join Date
    Jan 2003
    Posts
    729
    THAT is exactly what i was looking for SirDice thank you
    work it harder, make it better, do it faster, makes us stronger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •