[ic] Searches and turning 'su' (substring) on and off

Ed LaFrance interchange-users@lists.akopia.com
Fri Jul 20 11:54:00 2001


At 01:51 PM 07/20/2001 +0100, you wrote:
>(IC 4.6.5, Debian 2.2-17, MySQL 3.22, Perl 5.005-03)
>
>Hi people,
>
>I have a search that I would like to do:
>
>[search-region more=1 arg="
>   fi=products
>   tf=description
>   st=db
>   ml=8
>   sp=@@MV_PAGE@@
>
>   su=yes
>   sf=description
>   se=[cgi search_txt_spec]
>
>   su=yes
>   sf=comment
>   se=[cgi search_txt_spec]
>
>   su=yes
>   sf=sku
>   se=[cgi search_txt_spec]
>
>   su=no
>   sf=inactive
>   op===
>   se=0
>"]
>
>where description,comment and sku are searched with a substring match but 
>turn it (the substring match) off for the inactive field. I've read the 
>appropriate search dox a half dozen times and cannot make head nor tail if 
>this is possible or not. I believe I have tried every combination of 
>placement with the su and other tags which either turns the substring 
>match off altogether or matches the inactive field with eg Pakistan 2000 
>shirt having zeros in the name.
>

This looks like a coordinated search, so you should add co=yes near the 
top.  Also, I have learned through experimentation that, if you need to use 
op= or nu= for one sf/se pair, you need to use them for all in order to get 
the expected results.  The op= parameter has many useful arguments that can 
replace parameters like su=yes, so your search would look something like:

[search-region more=1 arg="
   fi=products
   tf=description
   st=db
   co=yes
   ml=8
   sp=@@MV_PAGE@@

   sf=description
   se=[cgi search_txt_spec]
   op=rm
   nu=0

   sf=comment
   se=[cgi search_txt_spec]
   op=rm
   nu=0

   sf=sku
   se=[cgi search_txt_spec]
   op=rm
   nu=0

   sf=inactive
   op=!=
   se=1
   nu=1
"]

- Ed L.



===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================