[ic] Tricky coordinated searches mixing broad and specific matches

Dan Browning interchange-users@interchange.redhat.com
Wed Mar 6 14:29:00 2002


At 08:02 AM 3/6/2002 -0800, you wrote:
>Hi All -
>
>I've always had trouble composing coordinated searches which can 
>successfully mix broad matches with very specific ones. To give an example:
>
>[search-region search="
>         fi=products
>         st=db
>         co=yes
>         sf=description,comment,category
>         se=coffee
>         op=rm
>         nu=0
>         sf=inventory:quantity
>         se=0
>         op=>
>         nu=1
>         ml=99999
>"]
>...
>[/search-region]
>
>The idea is to find products that have something to do with coffee, that 
>are in stock.  It does alright with the coffee part, but the stock 
>filtering fails completely; out-of-stock items are right in there with 
>in-stock ones.
>
>Simplifying the search a bit:
>
>search-region search="
>         fi=products
>         st=db
>         co=yes
>         sf=description
>         se=coffee
>         op=rm
>         nu=0
>         sf=inventory:quantity
>         se=0
>         op=>
>         nu=1
>         ml=99999
>"]
>...
>[/search-region]
>
>Now the stock filtering works, but the match is too specific - it finds 
>items with 'coffee' in the description, but not 'coffees', for instance. 
>This is not in accordance with how the rm operator is supposed to work, to 
>my understanding.
>
>What I really want is the first example, working the way I expect it 
>to.  I guess an SQL query would be the best way to go, but this particular 
>site uses the GDBM, and I'm not sure the an SQL dbms is even available to them.
>
>I don't presume to be a search guru, anyone out there have any suggestions 
>on a better way to tackle a situation like this?
>
>Thanks in advance.
>
>- Ed L.

Are you sure you haven't asked this question before 
(http://interchange.redhat.com/archive/interchange-users/2001/msg07584.html)? 
Its OK, we all have trouble with coordinated searches from time to time.

To match 'coffees', try turning on "mv_substring_match" (or "su" for 
short).  To get the search working with multiple fields, perhaps colons 
instead of commas would do the trick (see the above thread).

search-region search=|
         fi=products
         st=db
         co=yes
         su=yes
         ml=99999

         sf=":description:comment:category"
         se=coffee
         op=rm
         nu=0

         sf=inventory:quantity
         se=0
         op=>
         nu=1
|]

I hope that helps,


+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Sr. Tech Consultant
| Kavod Technologies, 1498 SE Tech Center Pl Ste 170
| Vancouver, WA 98683  <dan.browning@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If this fortune didn't exist, somebody would have invented it.