kingmaster09
Chevereto Member
I want to search by some keyword but not show,
If search keyword full name To be displayed.
If search keyword full name To be displayed.
Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.
Please keep in mind:
I think i put "cat" as tittle on all images, last one i have uploaded as filename, title, description to test but no result found on search. The link you post here is also has option for three-character words to be searchable. It could be nice if you set 3 char searchable because "CAT" is one of most searchable keyword.
Thanks
How to config?
Can you tell us which file has to be change for this? I don't know MySQL language :/Here all the how-to: https://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html
$where = "WHERE MATCH(image_name, image_title, image_description, image_original_filename) AGAINST(:q IN BOOLEAN MODE)";
SELECT * FROM chv_images
WHERE image_title LIKE '%cat%'
ORDER BY CASE
WHEN image_title LIKE 'cat%' THEN 1
WHEN image_title LIKE '%cat' THEN 3
ELSE 2
END
Where to put this code?? i mean which file need to edit this?What coded did you edited? I use this query:
PHP:$where = "WHERE MATCH(image_name, image_title, image_description, image_original_filename) AGAINST(:q IN BOOLEAN MODE)";
Edit:
I'm seeing what you did, basically wrap :q in *. I will add that only if the search term is a single keyword with no spaces. That won't get accurate results, it will ignore any "cat" and just focus on terms like (something)cat(something).
Like I said, the solution for this is to implement LIKE operators which works in this way:
Code:SELECT * FROM chv_images WHERE image_title LIKE '%cat%' ORDER BY CASE WHEN image_title LIKE 'cat%' THEN 1 WHEN image_title LIKE '%cat' THEN 3 ELSE 2 END
Helloapp/lib/classes/class.search.php but it won't be the same as tweak the fulltext engine.
Hello
I am putting this code as your describe location but it give me blank screen in search result. Do you provide me detail instruction where to put this code at the starting of code or in middle of somewhere? I know this discussion marks as solved but i am just asking :/
Thanks
Sure, I've noticed that the search needs a lot of tweaks regarding min query length, sorting, etc. I will add those for future releases.So it will be added in upcoming releases?
Thank you so much for your great workSure, I've noticed that the search needs a lot of tweaks regarding min query length, sorting, etc. I will add those for future releases.