close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search keywords won't return results from a string

Thread began 1/16/2017 11:26 am by tmcbinc99963 | Last modified 1/31/2017 10:37 am by Ray Borduin | 2014 views | 12 replies |

tmcbinc99963

Search keywords won't return results from a string

The search will return items when using keywords 'green' or 'grease' (entered separately), but not when entered together with a space between. For example, if a product description in the Db reads "green is the best grease", and "green grease" is entered as keywords, it should find that product.

I found a post with this problem, but it went private and couldn't see the solution.

File attached.

Sign in to reply to this post

Ray BorduinWebAssist

You can fix this by adjusting the "Implied AND" in the search comparison settings.

You can set it to be a space character and then it would read that as AND instead of using an exact match.

To change it in the code just find: "%20OR%20"
and replace it with: "%20"

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

Same results. I changed it in two places:

//comparison list additions
$WADbSearch2->keywordComparison($KeyArr1,"".("".(isset($_GET["WADbSearch2"]))?$_GET["WADbSearch2"]:"") ."","OR","Includes","%20AND%20","%20OR","%22,%20%22","%22%20%22",0);
$WADbSearch2->keywordComparison($KeyArr2,"".("".(isset($_GET["WADbSearch2"]) && is_numeric($_GET["WADbSearch2"]))?$_GET["WADbSearch2"]:"") ."","OR","=","%20AND%20","%20OR","%22","%22",1);
$WADbSearch2->addComparisonFromList("ID","itemchecked","AND","=",1);

Sign in to reply to this post

Ray BorduinWebAssist

It doesn't appear the changes were uploaded. I had FTP access, so I went ahead and made the updates.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

Still not working as it should. When 'high speed' is entered, it should find products that have both high AND speed in the description (5 products), but it finds products that have combinations of high OR speed (61 products).

Sign in to reply to this post

Ray BorduinWebAssist

You just have to switch the "Implied AND" and "Implied OR" values in the UI so that the space character implies an AND instead of an OR. I've gone ahead and done that for you.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

I've added a table to the Db and reconfigured the Recordset LEFT JOINs, and also the Wizard to add in the additional columns. However, when I exit the Wizard, it tells me to be sure that what's supposed to be in the AND is not in the OR, and won't let me go further.

When I switch these around, I can close the Wizard, but the search no longer works properly.

I tried pasting in the above code to get it to work again, but on opening the Wizard it now says I have a syntax error and all editing must be made through the Wizard.

The search finds the new table, but not 'green grease' which was the original issue. Since you fixed the issue, I don't know how to get back where we were without running into the Wizard error message.

Sign in to reply to this post

Ray BorduinWebAssist

That is because you are setting the implied AND to a " " space and implied OR to ", " comma space. I think if you remove the space after the OR you will be able to apply without errors. Having the implied AND inside the implied OR is ambiguous so that is why it is giving the error.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

I can't edit the wizard now - error message: format of server side code is invalid. Plus I get an MM Error where the listings are.

I'm sure I edited the code wrong, but can't get back to where it was. Tried pasting in the code from the earlier post, but that doesn't change anything.

File attached.

Sign in to reply to this post

Ray BorduinWebAssist

I've updated the page so that you can edit it with the interface again and so that it works properly with the correct implied and and implied or.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...