Forums / General Questions / Search - including or ignoring "and" as first keyword in search query

Search - including or ignoring "and" as first keyword in search query

Started by nikerymis on 27 Jan 2014, 7:44 PM · Views: 469

Results 1 to 1 of 1
27 Jan 2014, 7:44 PM
#1
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

Search - including or ignoring "and" as first keyword in search query

Hi all,

I'm using the latest (1.5.1) on PHP 5.4.24 with MySQL 5.5.35. We've got a product whose name begins with the word "And", which is causing troubles with the search function. If we type the name into the search box, it returns "Invalid Keywords" instead of the product in question. We're using a header search bar (no sidebar), in case that makes any difference.

I've tried to insert a nbsp at the beginning of the keyword search (so when they click in the search box, their query is preceded by a space). That got rid of the Invalid Keywords error, but the product wasn't found with the search. I added the nbsp;AND to the product description and the product still wasn't found. I'm not competent enough with PHP or javascript to figure out how to ignore the "AND" if it's the first keyword, and I can't figure out a workaround that finds the product, so I'm hoping someone else is more inspired (or smarter ;3) than I am in this regard.

Thank you!

Sasha