• Welcome to the Chevereto user community!

    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:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Search image title by keyword (not full name) not show.

Status
Not open for further replies.
This is same problem in my site, When i put "cat" keyword that bring no result of cat images although i have lot of cat images on my site which has keyword of cat.
 
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
 
Last edited:
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

In cases of short sentences system could use %LIKE% rather than fulltext. For now you will need to tweak your mysql settings and re-build the indexes.
 
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
 
Last edited:
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
Where to put this code?? i mean which file need to edit this?
 
app/lib/classes/class.search.php but it won't be the same as tweak the fulltext engine.
 
app/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
 
Last edited:
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

I think that is better that you don't mess with it. It breaks the other searches and it is just a work in progress that I posted because @kingmaster09 pasted a piece of code.
 
So it will be added in upcoming releases?
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.
 
Status
Not open for further replies.
Back
Top