Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Search for multiple words in description (/showthread.php?t=9326)

nobin July 7th, 2013 11:05 AM

Search for multiple words in description
 
Store ID: 42333
Website URL: http://giftsniffer.com/
URL to page in question: http://giftsniffer.com/store/search/...iption=gsf+gsw

Hello,

I'm hoping you are able to help, because this problem has been driving me crazy.

Basically, the situation is this:

We are trying to create hand-picked selections of products. Since it is impossible to create custom tags for products, or to modify existing tags, we have resorted to copy-pasting the entire existing product description of those products we wish to "tag", and then adding our custom "tags" afterwards. We then created a JavaScript that seeks out these "tags", and makes their font color white. Thus, the "tags" exist within a product's description, but are not visible to the visitor.

What we now want to do is to essentially create a questionnaire that builds a search string that finds only those products containing all of the pertinent "tags". This is where I've gotten completely stumped, as the search behavior is not as expected.

When I search using search/?word=gsf+gsw, the search does not seem to search the description, as no results are returned (gsf and gsw are examples of our taqs, and there is one product that contains both), even though the documentation indicates that "word" does search description.

So I tried to use search/?description, and this works when I search for only one word, but, as soon as I add a second search term, it appears to only search for the last term.

So...can you please help? All I'm really trying to do is to search for multiple words within product descriptions (and this has to be on an "AND" basis, that is, all terms must be present within the description in order for the product to be returned as a result). Is there no way to do this?

Thanks in advance for your help.

Eric July 7th, 2013 04:47 PM

Hi,

Welcome to the forums!

Your 2 worded search should work. Can you provide real examples of the types of searches you are performing which are not working?

Eric

nobin July 7th, 2013 05:14 PM

Hi Eric,

Thanks for responding!

This does not work: http://giftsniffer.com/store/search/?word=gsf+gsw
And this does not work, either: http://giftsniffer.com/store/search/...iption=gsf+gsw

The product these should bring back as a result is this one: http://giftsniffer.com/store/jewelry...4700630856357/

(it contains both the word gsf and the word gsw at the tail end of its description -- remember, it's in white font)

Hope that helps you find out what's going on. Thanks again for your help!

Eric July 7th, 2013 08:46 PM

Hi,

Those won't work because your MySQL minimum character count for words that get indexed is 4 by default.

You can read more about that here: /show...=7067#post7067

You'll have to ask your webhost to decrease that minimum.

Eric

nobin July 28th, 2013 01:28 PM

Hello Eric,

Thanks for responding! I apologize it took me this long to respond to your reply, but I have been out of town.

Anyhow, I'm not sure that that's what's going on here. There are two types of search boxes that we currently have on the site. The first, which is found in our header, is the standard WordPress search, and it is able to fetch 3-character searches. The Datafeedr search does, however, indeed seem to have the 4-character minimum in place that you reference.

Since the WordPress search does not, however, I figure that the 4-character minimum is not a global setting, but perhaps one contained within Datafeedr's settings? Is there a way to change this setting?

I spoke with my webhost (GoDaddy), and they seemed to indicate that it would not be possible for me to alter core database settings because my site is hosted in a shared environment.

Would be great if you could help me out further with this issue.

Thanks again, in advance!

Robin

Eric July 28th, 2013 07:50 PM

Hi Robin,

I'm guessing WP is using "natural search" mode. We use "boolean search" mode. We've chosen the boolean mode because otherwise (in a "natural" mode) mysql uses 50% threshold, so that most common search words produce no results - this can be quite confusing. For example, if you have a store dedicated to shoes or dogs and someone performs a search with the word "shoes" or "dogs" in the search phrase, most likely no results will be returned, even though more than half of the products have that word in them.

The downside is there are character limits for search.

Eric

nobin August 2nd, 2013 11:13 AM

Hi Eric,

So there is no way in which we can make it possible for someone to search for a three-letter word? This is problematic, as we plan to feature a lot of jewelry -- and if someone types in "toe rings", for instance, they won't be presented with any actual toe rings.

Can you think of any way in which we can make this work? Surely we can't be the first to come across this problem, no?

Thanks again your time.

Robin

Eric August 2nd, 2013 11:16 AM

Hi Robin,

It's actually nothing we can change. It's a change that GoDaddy will have to make on their end. Basically it's a setting in MySQL that needs to be changed.

Eric

nobin September 8th, 2013 01:55 PM

Hi Eric,

This problem is unfortunately still not solved. I have, however, done a lot of research, and I'm pretty sure that this is not an issue with MySQL, but something with your code.

To illustrate, this works:
http://giftsniffer.com/?s=toe (this uses the WordPress default search, and it correctly returns the two articles containing the word "toe")

Strangely, this works, too:
http://giftsniffer.com/store/search/?description=14k

This does not:
http://giftsniffer.com/store/search/...on=14k+pendant

And neither do these two:
http://giftsniffer.com/store/search/?word=14k
http://giftsniffer.com/store/search/?word=14k+pendant (this returns everything containing "pendant", but ignores "14k")

So "description" works for a single word, even if that word is fewer than four characters. Ergo, the problem lies with DataFeedr.

On a side note, I tried building a workaround that added one or two * (which I presumed would function as a wildcard character) to each word in the search string less than four characters long. This works, but only unpredictably so (many products are omitted that should come back as part of the results). This is still implemented on the site, so I mention it in case you use the search box.

Can you help?

Thank you.

Robin

Eric September 8th, 2013 07:05 PM

Hi Robin,

We're looking into this.

Eric

niquya September 8th, 2013 07:23 PM

Hey Robin and Eric,

I like that post, I have the same problem, and kind of same concept as yours Robin, hand picked and product filtering etc.

I'm wondering if we could dive in the plugin and set it up so that product tags are actually customizable. I'm not a big programmer (at least not for web stuff), but maybe if we look at how it is done for other fields (e.g. brand, title, etc), we could figure it out ? Any tips to get that started Eric ?

Or of course an official datafeedr update, but the customizable tag field story wasn't in the plans last I read about it.

Thanks

Eric September 8th, 2013 07:26 PM

Hi niquya,

I've moved your thread to a new thread: /showthread.php?t=9579

Eric

Eric September 9th, 2013 08:38 AM

Hi Robin,

"description=..." uses exact search, it looks for products that contain the string "14k pendant", and there's no such product. For example, this works: http://giftsniffer.com/store/search/...=round+pendant

To match words in any order, use "word=..." which translates to a full-text query in mysql: http://giftsniffer.com/store/search/?word=14k+pendant

However that doesn't work as full-text uses the minimum character limit set by MySQL. In your case it seems to be set to 4, not 3.

Another thing about full-text searches is that it will ignore words that are too short. That's why ?word=14k+pendant returns results with the word "pendant".

I would suggest decreasing your MySQL minimum word length limit if possible.

Eric

nobin September 9th, 2013 12:16 PM

Hi Eric,

Interesting, thank you for the clarifications on the differences between "description=" and "word=" - that will be useful knowledge down the road.

GoDaddy assured me (on three separate occasions, by three separate individuals) that they had no server-level minimum search word length variable defined (in fact, they assured me the minimum word length for searches is one), so they conjectured that this must be something with my specific instance of MySQL or WordPress.

Do you know where I can change this limit? I've spent so many hours searching for a place to alter ft_min_word_length, and the only thing I've come across is places saying to "add an options file". I have no idea what that is, where to place it, and what exactly it should contain.

Going on the assumption that this is not a global server variable, based on what GoDaddy told me, meaning that it is something that I can actually change, can you please tell me how to change this? This is literally the biggest obstacle we have left before we can launch our site.

Thanks so much in advance.

Robin

Eric September 9th, 2013 01:26 PM

Hi
Quote:

Originally Posted by nobin (Post 44440)
GoDaddy assured me (on three separate occasions, by three separate individuals) that they had no server-level minimum search word length variable defined (in fact, they assured me the minimum word length for searches is one), so they conjectured that this must be something with my specific instance of MySQL or WordPress.

That's correct. It's not a server-level configuration. It is a MySQL configuration setting.

Quote:

Originally Posted by nobin (Post 44440)
Do you know where I can change this limit? I've spent so many hours searching for a place to alter ft_min_word_length, and the only thing I've come across is places saying to "add an options file". I have no idea what that is, where to place it, and what exactly it should contain.

To change the minimum word length, you need to set this: ft_min_word_len=3

Here is more info:
http://dev.mysql.com/doc/refman/5.1/...ne-tuning.html

Unfortunately this is something that your host will need to assist with and I have a feeling GoDaddy won't make this change for you... I could be wrong though.

Quote:

Originally Posted by nobin (Post 44440)
Going on the assumption that this is not a global server variable, based on what GoDaddy told me, meaning that it is something that I can actually change, can you please tell me how to change this? This is literally the biggest obstacle we have left before we can launch our site.

This varies from host to host. It typically requires restarting MySQL, too.

Here are a few threads I found regarding the ft_min_word_len setting and GoDaddy:

http://support.godaddy.com/groups/we...n-from-4-to-2/
http://support.godaddy.com/groups/we..._len-variable/

I hope this helps...

Eric

nobin September 12th, 2013 09:42 AM

Hi Eric,

I just spoke with GoDaddy, and it was extremely frustrating. I would have to pay $244.99 per month in order to be able to change that variable.

I can't possibly believe that I am the first person to encounter this problem. Isn't there SOME way to solve this? Is there an alternate search plugin that we can use? The default WordPress search doesn't encompass the products, but is there some alternative search that does?

Or, is there any way that you can modify any code on your end to make this work? I've seen WordPress search plugins that (supposedly) allow you to search fewer characters, so there must be some way to do it.

I'm really, really upset right now. We've put 100+ man hours worth of work into our site, and what you and GoDaddy are basically telling me is that there is no way that our site can have a functional search. A four character minimum is a death sentence, it's totally illogical, and, given that GoDaddy is unwilling to help me move my site to even another host, it would seem we have no chance of making this work, except for totally starting over, and discarding all of our hard work. This is crazy. How come no one else has encountered this problem??

Please, can you think of a solution?

Robin

Eric September 12th, 2013 11:56 AM

Hi Robin

I completely understand your frustration. I've heard similar stories from other GoDaddy customers.

Unfortunately we're up against a mysql limitation. There's not much we can do about that. $200 plus for them to change that is insane!

My suggestion is to contact a few other hosts to see if they can offer what you need. You might consider a VPS solution. It's a little more expensive than shared hosting however much less than GoDaddys quote.

Both Stefan and I have used Liquid Web for years. I would contact them about your needs and get a quote. They are great to work with and have awesome support.

I hope this helps.

Eric

nobin September 12th, 2013 02:20 PM

Hi Eric,

Okay, I appreciate the suggestion.

Is it possible to copy our website over from one host to the other? It's not feasible for us to completely start over again; to say this would be demoralizing is the understatement of the century.

Also, do we lose all of our Datafeedr work, or will those settings stay, given that they're in the land of Datafeedr? I would assume all we would need to do is create a new connection string, correct?

I hope we don't have to start all over again; GoDaddy made it seem as though that is the case. That would be so utterly devastating.

Please let me know.

Thanks,

Robin

Eric September 12th, 2013 08:57 PM

Hi,

Yes, it's possible to copy a website from 1 host to another. It's actually quite common and expected. I'm sure Liquid Web could help you with that.

You won't lose ANY Datafeedr work and it will work with the same connection key.

If GoDaddy said you'd have to start over, that's wrong.

Just contact some webhosts and make sure they meet your requirements and ask them about their migration services.

Eric

nobin September 13th, 2013 07:51 AM

Hi Eric,

Okay, that's extremely reassuring.

Thanks for your help throughout this rather frustrating issue.

It might be advisable to put a notice recommending potential customers of yours not to host with GoDaddy in a shared environment, or, if you don't want to single out GoDaddy, to instruct us to pay special attention to this variable when choosing a host.

Thanks again,

Robin


All times are GMT -5. The time now is 12:56 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.