Author |
Topic |
|
[email protected]
VP-CART New User
149 Posts |
Posted - January 14 2015 : 11:50:24
|
Hi, Is there any way of altering the searching methods so that it will only return results when it finds a whole word match?
For example, we sell a variety of winter-esque products and someone may type in "ice" to see what ice-related products we have. The problem is that results that don''t have the word "ice" in them still show up, triggered by the letters i-c-e in words like price, dice, mice, slice, etc... Is there any way to change this so it will only return a result if the title/subtitle/description has the whole word ice and ignoring i-c-e if it is contained inside another word? |
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - January 15 2015 : 00:20:04
|
what about using shopsearch.asp and u use "With the exact phrase" enter ice. i think that should work for u. if not i will think other idea for u.... diego. |
|
|
[email protected]
VP-CART New User
149 Posts |
Posted - January 16 2015 : 14:44:54
|
It''s possible, it just doesn''t work with the quick search in the top right hand corner. I will see if it simply adds a variable to the url when the "with the exact phrase" is added...if so...I can add that variable to the end of the url in the quick search box
*update* Just tested it out using the advanced search. If I search for "ice cleats" while using "with the exact phrase" it will work. If I search for "ice" while using "with the exact phrase" it goes back to the original problem of not finding whole words only |
Edited by - [email protected] on January 16 2015 14:51:43 |
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - January 16 2015 : 20:36:46
|
sunshore, what is ur website address. i want to play a bit with ice searching and wanting to see how your site result. diego |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - January 19 2015 : 11:39:01
|
i think you can find exact result if you activate ajax search? cmiiw
*serj* |
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - January 19 2015 : 19:56:57
|
serjt,ur idea will work. what i found when searching ajax feature is on, i search something with a word and it show result to me a listing suggestion where i only pickup the one i wanted. sunshore, how about trying that idea ?? diego |
|
|
[email protected]
VP-CART New User
149 Posts |
|
manilow
VP-CART New User
France
134 Posts |
Posted - January 22 2015 : 03:58:04
|
I think it has something to do with the sql string generated in shopdisplayproducts.asp.
Check the sql string by including the following line at the top of shopdisplayproducts.asp (right after INCLUDE''s) :
response.Write("<! sql string = " & getSess("sqlnofilter") & "-->")
Generate a new search and check in the page source code for ''sql string''. This string should include an instruction cname = ''ice'' if you search for the keyword ''ice'', and not cname like ''%ice%''.
Kind regards,
Erik www.aquathermia.com
|
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - January 23 2015 : 20:35:18
|
if using cname = ''ice'', it just show product name ice , for product name ice cream, u wont get that ice cream in result....better using cname like ''%ice%'' how about my idea ? diego |
|
|
manilow
VP-CART New User
France
134 Posts |
Posted - January 24 2015 : 14:37:09
|
You''re right Diego. cname = ''ice'' will only return the product with that exact name. cname like ''%ice%'' is the right syntax.
To get only search results with the whole word ''ice'', the sql string should include cname like ''% ice %'' (including spaces).
Erik www.aquathermia.com |
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - January 27 2015 : 22:50:36
|
hmm... include cname like ''% ice %'' (including spaces in left and right), if cname is like "ice cream" it will not get it. cname like "best ice cream" will return... so how bout including OR : cname like ''% ice %'' OR cname like ''%ice %'' OR cname like ''% ice%''. any comment is welcome. diego |
|
|
|
Topic |
|