Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7

Thread: Search Script?

  1. #1
    Junior Member PoorDoggie's Avatar
    Join Date
    Apr 2005
    Posts
    5
    Member #
    9685
    I am doing a script where I list "things" in a DB.

    I was just wondering if anyone had a good Idea about how to go around it. I suppose I can code it I just wanted to know if I should do it my way:

    1. User searches
    2. Script searches "keyword" field in the "index" table for matching keywords... these results get displayed first.
    2. Script searches "description" field in the "index" table for matching words... these results get displayed next.
    3. Script searches in the "similar" table for similar words, and then searches the "index" table with those similar words and displays these last.

    Would that work, or is there a better way to do it?

    Thanks
    Tom

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Sounds like an overkill to me, is your site HUGE?

    However, if you got it working, all credits to you!

    Maybe you can post your DB structure (all tables) and query lists?

    A multiple task query like that would be interesting to see for other members. Especially how you use intertable relationship to optimize your search parameters! (FULLTEXT columns and use of other optimizing indexes relevant to multi-table-column comparison searches)

    Obviously, you have not placed all this info in one table (as info apperantly is cross referenced through some common denominator in different tables).

    I would like to see a short description of what kind of info you are gathering/holding, and how you have distributed that through your different tables (how you relate these different topics/articles throug different tables), and what table indicies you use to tie them all together.
    S. Rosland

  4. #3
    Junior Member PoorDoggie's Avatar
    Join Date
    Apr 2005
    Posts
    5
    Member #
    9685
    err... I don't have the site as yet. I am scripting the site. I was just wondering if that would be a good way to do it! lol

    The script is a search site. (kinda). Basically, the user types in a keyword, and so on...

    Table structure (i was thinking of):

    Table1: Sites
    - Name
    - Description
    - Keywords

    Table2: Simlar_Words
    - Word
    - Similar_Word

    And then, I was gonna do:
    1. search the "sites" table to display all sites with same keywords
    2. search the "sites" table again, to display all sites with same words in the description field
    3. search the "similar_words" table to find all similar words, and then re-search the "sites" table again with those similar words and display all those.

    Its really not that complicated. lol

  5. #4
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    To be honest you'd probably get almost exactly the same results if you just used the mySQL fulltext search across all the relevant fields of the first table ordered by relevance.

    I've been using that method on an intranet site with about 100 users over the past six months and I've not had any complaints about irrelevant results.

  6. #5
    Junior Member PoorDoggie's Avatar
    Join Date
    Apr 2005
    Posts
    5
    Member #
    9685
    Quote Originally Posted by mossoi
    To be honest you'd probably get almost exactly the same results if you just used the mySQL fulltext search across all the relevant fields of the first table ordered by relevance.

    I've been using that method on an intranet site with about 100 users over the past six months and I've not had any complaints about irrelevant results.
    Whats the fulltext search?

  7. #6
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times

  8. #7
    Junior Member PoorDoggie's Avatar
    Join Date
    Apr 2005
    Posts
    5
    Member #
    9685
    thanks


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:19 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com