Forums
This topic is locked
Quick question
Posted 05 Jan 2002 15:59:14
1
has voted
05 Jan 2002 15:59:14 Adam Toohey posted:
Hi,I am new to sql and search engines, I was wandering if it is the norm to put a field in your database full of keywords for your searches so you get optimal results. I tried many things for a business directory,but if the type of business wasn't in the business name I wan't getting the most results. I thought and thought and I came up with a new field with the keywords in it and my results are now very good. I just want to know if this is used in other search engines to optimize results?
Thanks in advance,
Adam
Replies
Replied 05 Jan 2002 16:38:39
05 Jan 2002 16:38:39 Owen Eastwick replied:
Normally you would create a search that was capable of looking through multiple columns and/or tables within the database.
There is nothing intrinsicly wrong with the method you're using, but I assume that you have manully selected and entered the keywords in there own column. This is fine for a small Database but imagine if you had to do it for all the books in Amazon.com's DB. Also it's applying some human thought to the process which may not match the visitors, if you see what I mean.
If you came up with a way of automatically generating the keywords I'd be interested to know how you did that?
See link below.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 05 Jan 2002 16:47:50
There is nothing intrinsicly wrong with the method you're using, but I assume that you have manully selected and entered the keywords in there own column. This is fine for a small Database but imagine if you had to do it for all the books in Amazon.com's DB. Also it's applying some human thought to the process which may not match the visitors, if you see what I mean.
If you came up with a way of automatically generating the keywords I'd be interested to know how you did that?
See link below.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 05 Jan 2002 16:47:50
Replied 06 Jan 2002 03:11:00
06 Jan 2002 03:11:00 Adam Toohey replied:
Hi Owen,
Thanks for th swift reply. I have read and got your tutorial working (very good I might add) I learnt alot from your tutorial, but found it hard to implement it for my database and search engine. In the end it was macromedia's tutorial that gave me insight on how to work it for my database.
How come when I submit sites I develop to search engines most of them reqiuire me to type in the keywords even though I have them on the site I am submitting? Is this their way of not having to manually type in the keywords? I really get the shits when I am looking for something on search engines and I get results for things I didn't even search for. Try UdZone for starters <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle> I have developed an insert page for my business directory with the insert sb. Whithin this insert page, I have a field with keywords, this is how I insert the keywords.
They have to be manually typed in because: here is an example. I have a few hairdressers, some are called hairdressers and some are called something completely different, and there is also barbers. They all do different things. Some do nails, some do just mens hair cuts, some do hair colour change etc etc. The only way I was to get the results for the particular type of hairdresser was to put in keywords. Now I have it working well. I must admit, I am typing in new ones all the time to optimize it better.<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> I have to manually type in all the records anyway, just like Amazon I am sure, so a few extra words while I am at it isn't too bad.
One more quick question for you if you don't mind, how do I get the results page to reflect the search words on it. I mean if I searched for hairdressers and there no records found I want it to say, Sorry, your search for Hairdressers returned no results, or fifty results depending on the results.
Thanks Owen,
Adam Toohey
Thanks for th swift reply. I have read and got your tutorial working (very good I might add) I learnt alot from your tutorial, but found it hard to implement it for my database and search engine. In the end it was macromedia's tutorial that gave me insight on how to work it for my database.
How come when I submit sites I develop to search engines most of them reqiuire me to type in the keywords even though I have them on the site I am submitting? Is this their way of not having to manually type in the keywords? I really get the shits when I am looking for something on search engines and I get results for things I didn't even search for. Try UdZone for starters <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle> I have developed an insert page for my business directory with the insert sb. Whithin this insert page, I have a field with keywords, this is how I insert the keywords.
They have to be manually typed in because: here is an example. I have a few hairdressers, some are called hairdressers and some are called something completely different, and there is also barbers. They all do different things. Some do nails, some do just mens hair cuts, some do hair colour change etc etc. The only way I was to get the results for the particular type of hairdresser was to put in keywords. Now I have it working well. I must admit, I am typing in new ones all the time to optimize it better.<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> I have to manually type in all the records anyway, just like Amazon I am sure, so a few extra words while I am at it isn't too bad.
One more quick question for you if you don't mind, how do I get the results page to reflect the search words on it. I mean if I searched for hairdressers and there no records found I want it to say, Sorry, your search for Hairdressers returned no results, or fifty results depending on the results.
Thanks Owen,
Adam Toohey
Replied 06 Jan 2002 04:07:20
06 Jan 2002 04:07:20 Owen Eastwick replied:
Use the Show If Recordset Is Empty an Is Not Empty server behaviours.
Create your recordset based on the Search results, set up the repeat region recorset navigation etc. Then Include all this in a Show if Recordset not Empty region. Similarly Type some text on the page, something like <b>Sorry no matches found.</b> and use Show if recordset is Empty.
If you look in the Data Bidings panel you will see [total records] below the database fields you have included in your recordset. Simply drag this on to the page as you would any other dynamic text. You can then put some extra text around it like: <b>Your search found [total records] matches</b>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Create your recordset based on the Search results, set up the repeat region recorset navigation etc. Then Include all this in a Show if Recordset not Empty region. Similarly Type some text on the page, something like <b>Sorry no matches found.</b> and use Show if recordset is Empty.
If you look in the Data Bidings panel you will see [total records] below the database fields you have included in your recordset. Simply drag this on to the page as you would any other dynamic text. You can then put some extra text around it like: <b>Your search found [total records] matches</b>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 06 Jan 2002 14:16:04
06 Jan 2002 14:16:04 Adam Toohey replied:
Hi Owen,
I didn't explain it to you properly <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
I want it to say the word that was searched for. Example if someone types in hairdressers, the results page will say the word hairdressers along with the number of results. I know how to get the number of results aswell as sorry no results with the show if recordset is empty sb, just need the word that was searched for.
Another one for you...
I really liked the connection type you used in your tutorial and have got it working ok.
I have a connection set up using a dsn for my search engine, and everything works well. When I use the connection type you showed me in your tutorial, the search works ok if there is a record but returns an error saying current record required if there are no results. I have the show if recordset empty and not empty on the page, but it still comes up with the error. I get no errors if I am connected using the dsn.
Have you come accross this before? I am using access 2000, ud4, windows 2000 running iis 5.
Thanks Owen,
Adam Toohey
I didn't explain it to you properly <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
I want it to say the word that was searched for. Example if someone types in hairdressers, the results page will say the word hairdressers along with the number of results. I know how to get the number of results aswell as sorry no results with the show if recordset is empty sb, just need the word that was searched for.
Another one for you...
I really liked the connection type you used in your tutorial and have got it working ok.
I have a connection set up using a dsn for my search engine, and everything works well. When I use the connection type you showed me in your tutorial, the search works ok if there is a record but returns an error saying current record required if there are no results. I have the show if recordset empty and not empty on the page, but it still comes up with the error. I get no errors if I am connected using the dsn.
Have you come accross this before? I am using access 2000, ud4, windows 2000 running iis 5.
Thanks Owen,
Adam Toohey
Replied 06 Jan 2002 17:23:39
06 Jan 2002 17:23:39 Owen Eastwick replied:
To display the search word on the results page:
Assuming that he word is typed into a textfield within a form on a search page and the results on a page that is set as the Action property of the form.
If the form Method is POST use <% = Request("textfieldName" %>, if the method is GET then use <% = Request.QueryString("textfieldName" %>
Regards the "Operation Requires a Current Record", well yes I have come accross this before, however I didn't realise that there was a difference between OLE and ODBC in this respect. To be honest I've always used OLE, mainly because you don't have to mess about setting up a DSN at a remote host. However it sounds like a portion of your code is trying to access the empty recordset - as there was no match. Look carefully at the code and see if you can spot it.
If you find anything referencing the recordset simply place the....
<% If ((Not RecordsetName.BOF) Or (Not RecordsetName.EOF)) Then %>
ANY CODE THAT USES THE RECORDSET
<% End IF %>
....code around it.
You could set up the recordset then place these two lines around all the code after it (Recordset Navigation, Stats etc.) as we don't need any of it to run if the recordset is empty.
Similarly make sure that nothing that requires anything from the recodset is on the page outside the "Show If Not Empty" region.
Does the Error Message give a Line Number? What's on this line in code view?
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Assuming that he word is typed into a textfield within a form on a search page and the results on a page that is set as the Action property of the form.
If the form Method is POST use <% = Request("textfieldName" %>, if the method is GET then use <% = Request.QueryString("textfieldName" %>
Regards the "Operation Requires a Current Record", well yes I have come accross this before, however I didn't realise that there was a difference between OLE and ODBC in this respect. To be honest I've always used OLE, mainly because you don't have to mess about setting up a DSN at a remote host. However it sounds like a portion of your code is trying to access the empty recordset - as there was no match. Look carefully at the code and see if you can spot it.
If you find anything referencing the recordset simply place the....
<% If ((Not RecordsetName.BOF) Or (Not RecordsetName.EOF)) Then %>
ANY CODE THAT USES THE RECORDSET
<% End IF %>
....code around it.
You could set up the recordset then place these two lines around all the code after it (Recordset Navigation, Stats etc.) as we don't need any of it to run if the recordset is empty.
Similarly make sure that nothing that requires anything from the recodset is on the page outside the "Show If Not Empty" region.
Does the Error Message give a Line Number? What's on this line in code view?
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo