Forum

Questions and discussions

Search Description, Title and Keywords

Report any problems or bugs

Search Description, Title and Keywords

Postby dpi » Tue Mar 04, 2014 11:54 am

Hello,
Now do I search by the description and the picture does not appear.
If you search by Keywords already appear.
I wonder how to change this?
I do full description of the image and that's what matters up in searches.
The Keywords are almost always the same, only interested in a second plane.
Please help change the search of images,
thank you,
PO
dpi
 
Posts: 20
Joined: Sat Feb 19, 2011 12:01 pm

Re: Search Description, Title and Keywords

Postby admin » Thu Mar 06, 2014 10:40 am

If you open the file /members/content_list_vars.php you will find the code:

Code: Select all
      //Slow query. With '%' and 'like' - faster
      //$com2.=" (b.title rlike '[[:<:]]".$sch[$i]."[[:>:]]' or b.description rlike '[[:<:]]".$sch[$i]."[[:>:]]' or b.keywords rlike '[[:<:]]".$sch[$i]."[[:>:]]') ";
      
      //Cirillic
      //$com2.=" (UCASE(b.title) like UCASE('%".$sch[$i]."%') or UCASE(b.description) like UCASE('%".$sch[$i]."%') or UCASE(b.keywords) like UCASE('%".$sch[$i]."%')) ";
      
      //Fast query
      //$com2.=" (b.title like '%".$sch[$i]."%' or b.description like '%".$sch[$i]."%' or b.keywords like '%".$sch[$i]."%') ";
      
      //Fast query. It searches without 'description'.
      $com2.=" (b.title like '%".$sch[$i]."%' or b.keywords like '%".$sch[$i]."%') ";


You can search in the titles, keywords and descriptions, search a entire or only a part of the word.

Now the active option is without the description:

Code: Select all
//Fast query. It searches without 'description'.
      $com2.=" (b.title like '%".$sch[$i]."%' or b.keywords like '%".$sch[$i]."%') ";


You can change it.
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

IPTC: Also search in Description

Postby mj72 » Fri Jan 16, 2015 7:18 pm

The line under Slow query: Removed // at the beginning.

The line under Fast query: Added // at the beginning.

GREAT, thanks a lot!!

All searchwords is essential for the user to find photos.
Maybe it could be added in next version under Settings...?
mj72
 
Posts: 96
Joined: Sat Jan 10, 2015 10:55 am

Search Description, Title and Keywords - and entire words

Postby mj72 » Tue Feb 03, 2015 10:34 pm

Tried a lot of combinations without succes.

I want to search title, keywords and description.
I want only to search for entire words.

//Fast query
$com2.=" (b.title like '%".$sch[$i]."%' or b.description like '%".$sch[$i]."%' or b.keywords like '%".$sch[$i]."%') ";

searches in part of the word.
mj72
 
Posts: 96
Joined: Sat Jan 10, 2015 10:55 am


Return to Bugs & Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.