[ic] search returning opposite results

Grant interchange-users@icdevgroup.org
Wed Jun 11 15:06:01 2003


> Grant [listbox@email.com] wrote:
> > 
> > The following search returns every product with 1 in the 
> not_online field
> > instead of every product without the 1.  What am I doing wrong?
> > 
> > [loop search="ml=1000/tf=sku/sf=not_online/se=1/op=!=/nu=1"]
> > 
> I've just had a hunt through the manual and the source and the co=1
> requirement appears to be intentional, rather than a bug.  I'm not sure
> why that is, but both the manual and the code confirm the requirement.
> 
> Source:  Vend::Search::spec_check()
> 
>     Find the line that reads: "last COLOP unless $s->{mv_coordinate};"
> 
> Manual: Interchange Database section 5.4 (Coordinated and Joined 
> Searching)
> 
>     This section has the only list of the various comparison operations,
>     thereby implying the requirement.
> 
> Anyway, add co=1 to your search spec and it'll work as you expect.

Thanks a lot Kevin!  I wouldn't have been able to come up with that.

- Grant