Keyword

Search - character limit

  • Louisa
  • Louisa's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #90129 by Louisa
Search - character limit was created by Louisa
Hello,
When I do a search of my products it wont find words with 3 letters.

Some of my products have 3 characters, and i would like them to be searchable.

eg. Say i have a product called "Car". When i type "car" into the search field, nothing comes up.

Say I change my products name to say "Cars" and then I type "car" again in the search field, it is then found.

Could someone please provide me with some instruction on how I could fix this?

Very much appreciated. Thanks.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90130 by Rudi Sluiter
Replied by Rudi Sluiter on topic Search - character limit
We are having the same problem. Haven't found the answer though.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90131 by william white
Replied by william white on topic Search - character limit
I am not sure, but I think this is more of a problem with the way searches are conducted. They are looking for stings in objects. Try searching google for a or b or car. I think the programmers expect people to type something more descriptive so the search can be better. Try embedding the words you want to search for into the text of the item somewhere, which it may already be.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90132 by René Sluiter
Replied by René Sluiter on topic Search - character limit
That's kind of lame right? The joomla search gives correct results, only K2 items are shown from 4+ characters.

If you got K2 items with 3 characters and want to search/filter them it should give me results from 3+ characters which contain the three characters from my search string right?

For example:
I got the following K2 items:
WVR
WVRB
WVRPA
DCN
WCERP

I use the following filter/search string: WVR
The expected result should be:
WVR
WVRB
WVRPA

But I only get:
WVRB
WVRPA

That's just wrong. I already found a joomla hack that changes the joomla search character limitation (from 3 to 2 characters) but it still only shows only K2 items with at least 4 characters so I think it's save to say there's a small bug in the K2 filter/search script that generates the results..



William White said:I am not sure, but I think this is more of a problem with the way searches are conducted. They are looking for stings in objects. Try searching google for a or b or car. I think the programmers expect people to type something more descriptive so the search can be better. Try embedding the words you want to search for into the text of the item somewhere, which it may already be.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90133 by René Sluiter
Replied by René Sluiter on topic Search - character limit
I found the 'problem' for the search function.

The MATCH AGAINST query, used by K2 search, uses the full-text indexing service of MySQL. The default minimum length of words that are indexed is 4. To change this you need to edit the mysql\bin\my.ini file with the following code under [mysqld]:
#The minimum and maximum lengths of words to be indexed are defined by the ft_min_word_len and ft_max_word_len system variables.
#If you change either value, you must rebuild your FULLTEXT indexes.
#For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by editing the following line
ft_min_word_len = 3

after that you need to restart the server and rebuild the FULLTEXT indexes. In SQL you can give the following command:
REPAIR TABLE tbl_name QUICK;

Now the search function works.
Sorry for blaming K2 ;)

Source

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #90134 by Markus Thiel
Replied by Markus Thiel on topic Search - character limit
Seems kind of strange not to use the same filter as in the com_search.. this really makes it harder to fix the issue for sites on shared hosting.. :/

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #90135 by René Sluiter
Replied by René Sluiter on topic Search - character limit
I agree, I can change it easily in XAMPP but I don't have rights on the server to change this...

Markus Thiel said:
Seems kind of strange not to use the same filter as in the com_search.. this really makes it harder to fix the issue for sites on shared hosting.. :/

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #90136 by René Sluiter
Replied by René Sluiter on topic Search - character limit
found a workaround to search for three letter K2 items:

give your items a tag with a underscore at the end.

 

If you got an item like 'Car' give it the tag 'car_'.

 

If you search for car it searches for all 4+ letter words with *car* in it, so with the fourth character being an underscore the tags are getting indexed and are used when using the search!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum