Author Topic: help! Problem passing search_terms as shortcut to search.php  (Read 7292 times)

0 Members and 1 Guest are viewing this topic.

Offline jengwen

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.jenrichardsphotography.com
help! Problem passing search_terms as shortcut to search.php
« on: March 11, 2003, 07:01:28 AM »
I am working on a mod to do a 'More Like This' search that uses all keywords associated with an image to find others with those exact keywords.  Here is an example of the shortcut I am using:
Quote
Shortcut to search.php?search_terms=all&search_keywords=Animal Bird Milwaukee_County_Zoo


It works except it seems to seach with an 'OR' instead of 'AND'.  I have tried making search_terms=all and search_terms=1, but neither seems to work.  Can anyone help me with the syntax?

If anyone wants to try it, go to the details page and click on the 'More Like This' link under any image at  http://www.jenrichardsphotography.com

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
help! Problem passing search_terms as shortcut to search.php
« Reply #1 on: March 11, 2003, 03:42:57 PM »
search_terms=all = AND
search_terms=any = OR

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline jengwen

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.jenrichardsphotography.com
help! Problem passing search_terms as shortcut to search.php
« Reply #2 on: March 11, 2003, 06:36:48 PM »
Thanks for the fast response Jan.  I thought it was supposed to be 'all', but it doesn't seem to be working.  Maybe I will try capitalizing it.  Also, does it need to be in quotes when I send it?

I thought maybe the problem is that it is only picking up the first of my search_keywords, but I just played around with that a bit and found one that matched on only the last keyword, so that part seems to be working OK, except it is using OR instead of AND.

Offline jengwen

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.jenrichardsphotography.com
help! Problem passing search_terms as shortcut to search.php
« Reply #3 on: March 12, 2003, 06:37:45 AM »
I tried everything and couldn't get it to work by passing a search_term.  I ended up having to set the default in search.php to be '1' and now it works great.