Making a field non-searchable?? |
Post Reply | Page <1234> |
Author | |
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
OK -
I've taken a look at the patch version of the files - There's more to this search code than I thought. I'd start by commenting out lines 395 & 486 in showsearchresults.asp, both read : strSQL=strSQL & " OR " & tmpSQL2 A see what difference that makes - I need to get an understanding of what the XML_ and inc_ members are up to. OK - A quick look reveals very similar code in inc_srcPrdQuery.asp - So I would comment out line 477 in that as well. That's my starter for ten - but I'll look at it further. |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
I see there is also an includes/languages.asp - I assume you have both already got custom versions of that file in place. Just in case you hadn't spotted it :-)
|
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
I suggest testing the new version of the code FIRST - before chopping it about by commenting the lines out. It will give you some figures to compare with & also prove it's working OK as delivered.
One thing I didn't look at is the count of matches etc - I didn't spot where that is done - so it's worth checking that is producing the correct values as well when you comment the lines out. |
|
nathan
Newbie Joined: 20-April-2007 Status: Offline Points: 0 |
Post Options
Thanks(0)
|
It seems to me the only one I want to keep is tmpSQL2 since this is the Title? I only want to quary dbo.description.
|
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Hi,
I believe you are correct - Example : http://shop.rings-things.com/cart/pc/viewPrd.asp?idcategory=121&idproduct=8744 You just want :- "Bead, Glass, E, Ghost (Assorted)" To be included in the search? If so then I agree. |
|
nathan
Newbie Joined: 20-April-2007 Status: Offline Points: 0 |
Post Options
Thanks(0)
|
So I am having problems figuring out what code to comment out to only search the description.
|
|
nathan
Newbie Joined: 20-April-2007 Status: Offline Points: 0 |
Post Options
Thanks(0)
|
Yes, only the title.
|
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Hi Nathan,
I'll take another look at the code. |
|
nathan
Newbie Joined: 20-April-2007 Status: Offline Points: 0 |
Post Options
Thanks(0)
|
Thanks
|
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
OK - There's lots to this code & I'm certain it would be possible to amend it fairly radically to focus it on just the bits you want.
First thing some of the code runs via AJAX on the search page - to indicate the number of hits you will get - which is great, but maybe not for 18,000 prods - from memory (it's a few hrs since I looked, it's switched on/off depending on whether the AJAX Tooltip is enabled. I don't recall if this is the new or current version. That code will also need amending - if it IS enabld as it will give a different count from the actual search. Anyway, onto code changes... Look for Lines 394 & 485 :- strSQL=strSQL & tmpSQL strSQL=strSQL & " OR " & tmpSQL2 if tIncludeSKU="true" then strSQL=strSQL & " OR " & tmpSQL3 strSQL=strSQL & " OR " & tmpSQL4 & "))" else strSQL=strSQL & " OR " & tmpSQL3 & "))" end if And try :- ' HAM - strSQL=strSQL & tmpSQL ' HAM - strSQL=strSQL & " OR " & tmpSQL2 strSQL=strSQL & tmpSQL2 if tIncludeSKU="true" then ' HAM - strSQL=strSQL & " OR " & tmpSQL3 strSQL=strSQL & " OR " & tmpSQL4 & "))" else ' HAM - strSQL=strSQL & " OR " & tmpSQL3 & "))" strSQL=strSQL & "))" ' HAM - Added line end if - Where 'HAM are lines I commented out - Note the EXTRA line after the last commented out line. tmpSQL - Search of "Details" tmpSQL2 - Search of "Description" tmpSQL3 - Search of "Short Description" tmpSQL4 - Search by SKU I've NOT tested this code change and, of course (by design) it limits the breadth of the search. |
|
Post Reply | Page <1234> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |