creating search engine

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default creating search engine

    Hello everyone,

    I have one major table that contains some data and contain keys to many
    other tables. I am using RIGHT JOIN query method to get all my data and
    everything works very well. Now I am using the same query except i have
    a bunch of WHERE clauses in it to create a 'search engine', here's a
    fake example:
    SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    ON a.a=c.c.......and so on
    WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    ....and so on for about 25 WHERE cases total

    It works fine and fast when I have about 13 WHERE clauses, but when i
    exceed that, my script runs forever. I would like thank you in advance
    if anyone could help me out.
    Jimmy.
    I use asp,vb script, and access97 for my project.
    Again, thank you so much.



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Jimmy Tran Guest

  2. Similar Questions and Discussions

    1. Creating A Site Search Engine
      How would I go about creating a search engine for my website... so that it would search through the content of my pages which are written in php? ...
    2. XML search engine
      I'm relatively new to flash, but designing a searchable database for a lab group that I work with. I've looked all over the place, and can't find...
    3. Creating my own localised search engine
      Hi Guys Wonder if you can help. I know there are quite a few out there, FusionBot being one that I have taken a shine to, but if not just for...
    4. [PHP] Search Engine
      DvDmanDT wrote: The latest PHP|Architect issue has an article on interfacing Lucene with PHP. ...
    5. [PHP] Search Engine
      Does anyone know any free search engine for web application.... Google for "web application"? It's free. Oh, I get it! Google for "free...
  3. #2

    Default creating search engine

    Hello everyone,

    I have one major table that contains some data and contain keys to many
    other tables. I am using RIGHT JOIN query method to get all my data and
    everything works very well. Now I am using the same query except i have
    a bunch of WHERE clauses in it to create a 'search engine', here's a
    fake example:
    SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    ON a.a=c.c.......and so on
    WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    ....and so on for about 25 WHERE cases total

    It works fine and fast when I have about 13 WHERE clauses, but when i
    exceed that, my script runs forever. I would like thank you in advance
    if anyone could help me out.
    Jimmy.
    I use asp,vb script, and access97 for my project.
    Again, thank you so much.

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Jimmy Tran Guest

  4. #3

    Default Re: creating search engine

    [url]www.aspfaq.com/5003[/url]

    Ray at work

    "Jimmy Tran" <hunganh20@yahoo.com> wrote in message
    news:um2Wkp5dDHA.3464@TK2MSFTNGP11.phx.gbl...
    > Hello everyone,
    >
    > I have one major table that contains some data and contain keys to many
    > other tables. I am using RIGHT JOIN query method to get all my data and
    > everything works very well. Now I am using the same query except i have
    > a bunch of WHERE clauses in it to create a 'search engine', here's a
    > fake example:
    > SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    > FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    > ON a.a=c.c.......and so on
    > WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    > OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    > ...and so on for about 25 WHERE cases total
    >
    > It works fine and fast when I have about 13 WHERE clauses, but when i
    > exceed that, my script runs forever. I would like thank you in advance
    > if anyone could help me out.
    > Jimmy.
    > I use asp,vb script, and access97 for my project.
    > Again, thank you so much.
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Ray at Guest

  5. #4

    Default Re: creating search engine

    [url]www.aspfaq.com/5003[/url]

    Ray at work

    "Jimmy Tran" <hunganh20@yahoo.com> wrote in message
    news:%23Cmb3p5dDHA.3992@TK2MSFTNGP11.phx.gbl...
    > Hello everyone,
    >
    > I have one major table that contains some data and contain keys to many
    > other tables. I am using RIGHT JOIN query method to get all my data and
    > everything works very well. Now I am using the same query except i have
    > a bunch of WHERE clauses in it to create a 'search engine', here's a
    > fake example:
    > SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    > FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    > ON a.a=c.c.......and so on
    > WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    > OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    > ...and so on for about 25 WHERE cases total
    >
    > It works fine and fast when I have about 13 WHERE clauses, but when i
    > exceed that, my script runs forever. I would like thank you in advance
    > if anyone could help me out.
    > Jimmy.
    > I use asp,vb script, and access97 for my project.
    > Again, thank you so much.
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Ray at Guest

  6. #5

    Default Re: creating search engine

    Off the top of my head...this might work

    WHERE (a.a & b.b & c.c LIKE '%searchTerm%')

    I just had an idea to concatenate all the fields and search them once. Don't
    know if it will work though.

    "Jimmy Tran" <hunganh20@yahoo.com> wrote in message
    news:#Cmb3p5dDHA.3992@TK2MSFTNGP11.phx.gbl...
    > Hello everyone,
    >
    > I have one major table that contains some data and contain keys to many
    > other tables. I am using RIGHT JOIN query method to get all my data and
    > everything works very well. Now I am using the same query except i have
    > a bunch of WHERE clauses in it to create a 'search engine', here's a
    > fake example:
    > SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    > FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    > ON a.a=c.c.......and so on
    > WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    > OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    > ...and so on for about 25 WHERE cases total
    >
    > It works fine and fast when I have about 13 WHERE clauses, but when i
    > exceed that, my script runs forever. I would like thank you in advance
    > if anyone could help me out.
    > Jimmy.
    > I use asp,vb script, and access97 for my project.
    > Again, thank you so much.
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    ljb Guest

  7. #6

    Default Re: creating search engine

    Rather than having 13 clauses all tied together and conflicting with one
    another over bracket placement an effective (though unsophisticated)
    solution is to use a concatenated single search field.

    Assuming MS SQL Server
    CREATE VIEW vwSearchField AS
    SELECT tablename.result field, LOWER(tablename.search field 1+
    COALESCE(' ' + tablename.search field 2,'')+
    COALESCE(' ' + different table.another search field,'')+ etc..
    FROM tablename INNER JOIN etc..

    You can then easily create 3 different search types to apply to this view.
    SELECT tablename.result field FROM tablename INNER JOIN vwSearchField ON
    tablename.resultfield = vwSearchField.resultfield

    Any words in search:
    WHERE vwSearchField.strSearchField LIKE '%keyword1%' OR
    vwSearchField.strSearchField LIKE '%keyword2% OR etc..

    Any words in search:
    WHERE vwSearchField.strSearchField LIKE '%keyword1%' AND
    vwSearchField.strSearchField LIKE '%keyword2% AND etc..

    Exact phrase
    Any words in search:
    WHERE vwSearchField.strSearchField LIKE '%keyword1 keyword2 keyword 3%'

    This method works perfectly well for me and means that by just altering your
    view you can easily add new search fields.
    As I say, it's effective but you often get back a lot more results than you
    might want with the OR search.
    HTH

    Matt Smith


    Matt Smith Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139