Osclass Support Forums

Osclass plugin support => Ideas, improvements and tips => Topic started by: BabyDunk on August 19, 2016, 12:26:03 PM

Title: **Backoffice Manager** added search function
Post 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
Title: Re: **Backoffice Manager** added search function
Post by: MB Themes on August 19, 2016, 08:07:37 PM
@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...
Title: Re: **Backoffice Manager** added search function
Post by: BabyDunk on August 19, 2016, 09:27:30 PM
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   :-\


Title: Re: **Backoffice Manager** added search function
Post by: MB Themes on August 20, 2016, 03:46:03 PM
@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)
Title: Re: **Backoffice Manager** added search function
Post by: BabyDunk on August 21, 2016, 09:42:49 PM
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
Title: Re: **Backoffice Manager** added search function
Post by: MB Themes on August 22, 2016, 08:55:21 AM
@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.
Title: Re: **Backoffice Manager** added search function
Post by: BabyDunk on August 22, 2016, 12:55:49 PM
i changed the limits last night :D i now have search terms for 2 characters :D
Title: Re: **Backoffice Manager** added search function
Post by: MB Themes on August 22, 2016, 01:20:05 PM
@BabyDunk
Can you give here for other people how you did it?
Someone might get it useful ;)
Title: Re: **Backoffice Manager** added search function
Post by: BabyDunk on August 22, 2016, 02:56:31 PM
@frosticek no probs

to start you must have access to /etc/mysql/my.cnf via ssh

edit my.cnf
Code: [Select]
nano /etc/mysql/my.cnf
add this line under [mysqld] place the minimum value you would like to index, i chose 2 characters
Code: [Select]
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
Code: [Select]
service mysql restart
now to re-index

login to mysql
Code: [Select]
mysql -u yourusername -p input your password

find your database name
Code: [Select]
mysql>show databases;
select your database
Code: [Select]
mysql>use yourdatabasename;
find your table name (most likely oc_t_item_description)
Code: [Select]
mysql>show tables;
now if your table is oc_t_item_description if not then change your prefix for this next part

Code: [Select]
mysql>REPAIR TABLE oc_t_item_description QUICK
now to login out of mysql
Code: [Select]
mysql> quit
now refresh your site and do a search :D

Big thanks to byteGator for posting this on osclass forum.