Osclass Support Forums
Osclass plugin support => Ideas, improvements and tips => Topic started by: BabyDunk on August 19, 2016, 12:26:03 PM
-
Hello Frosticek
i dont even know if this thought is possible but no harm in asking,
you know the way to include shorter words in the Full-Text Search is to do followhttps://doc.osclass.org/Fine-Tuning_MySQL_Full-Text_Search_-_Improving_search (https://doc.osclass.org/Fine-Tuning_MySQL_Full-Text_Search_-_Improving_search)
but this will also index all words like "and, the, is, me, we and so on"
is their a way to add your own list to this index without having to index all these words that have no relevance to the actual search term?
i would like to have the likes of "tv, s6, s5, 5c, 6s, car and so on" but to get this with the general way of indexing all words with 2 characters seems abit harsh.
i dont know if this is possible but if it were it could be an nice added feature to backoffice manager or even a new plugin altogether :D
Cheers
Chris
-
@BabyDunk
Plugin use latest searches table of osclass, it is not possible to go through all the listings.
3 letters are minimum as it might get slow...
-
no problem :) the only way to get these search terms is to change the minimum index then .
i hope to upgrade to a server with ssd. which from what i see by reading reviews, it makes mysql reads alot faster. its just a pitty all unimportant words need to be indexed :-\
-
@BabyDunk
I am not sure but my server allows me to search by 1 letter as well.
http://zara.mb-themes.com/search/pattern,E (http://zara.mb-themes.com/search/pattern,E)
-
so i take it that means your server indexes every single letter? :-/ or do you have a special hack you're not sharing lol i am on patricia and i see your patricia demo searches is the same :) Excellent, i need to get it
are you on a dedicated server?? and do you manage you're own ?
i have a dedicated server and self-managed. was the only way to afford a machine with decent power and root access :D
-
@BabyDunk
I did not do any change on database, running on normal hosting for 30$ per year.
It might be limitation of your MySQL configuration.
-
i changed the limits last night :D i now have search terms for 2 characters :D
-
@BabyDunk
Can you give here for other people how you did it?
Someone might get it useful ;)
-
@frosticek no probs
to start you must have access to /etc/mysql/my.cnf via ssh
edit my.cnf
nano /etc/mysql/my.cnf
add this line under [mysqld] place the minimum value you would like to index, i chose 2 characters
ft_min_word_len = 2
now key ctrl and x will give you option to save and y to overwrite then enter
then restart mysql for settings to take effect
service mysql restart
now to re-index
login to mysql
mysql -u yourusername -p
input your password
find your database name
mysql>show databases;
select your database
mysql>use yourdatabasename;
find your table name (most likely oc_t_item_description)
mysql>show tables;
now if your table is oc_t_item_description if not then change your prefix for this next part
mysql>REPAIR TABLE oc_t_item_description QUICK
now to login out of mysql
mysql> quit
now refresh your site and do a search :D
Big thanks to byteGator for posting this on osclass forum.