[ic] Implementation of a new search type

Kevin Walsh kevin at cursor.biz
Fri Feb 27 08:40:11 EST 2004

Dr. Michael Streubel [Michael.Streubel at palmwaregroup.com] wrote:
> in my store, I want some of the categories in the category menu
> to retrieve its data not from the database but from a remote server
> via a web service. So I implemented a new search type which
> is working fine as far as the data search is concerned. All data
> structures are well defined and well set as far as I can see.
> Now consider the following test loop:
> [loop  search="
> bs=1
> em=1
> su=1
> ml=2
> fi=products_test
> st=.... new search_type ....
> tf=categoryid
> sf=categoryid
> se=189461
> "]
> [loop-code]
> [loop-field title]
> [/loop]
> As mentioned, the search works successfully. However, when
> it comes to iteration, the system still tries to use
> the database instead of retrieving information
> (in order to determine values of [loop-code],[loop-field title]) from the
> in-memory data. 
> How can I teach IC to not touch the database in this case ?
> (BTW, I still need and use a searchfile (fi) to get attribute names
> for my data structures. But I don't think that's the cause
> of the problem).
[loop-field] will look up the data from the products table, because
that's just what [loop-field] is supposed to do.  You probably want
to use [loop-param title] and pass "rf=title" to your query.  If you
specify a "rf" list then you can drop fi=products_test.

On the other hand, you could probably code your new search type to set
up the "rf" list itself, based upon the names in "fi"

It may be easier to make suggestions if you post your new "search type"
code here.

   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/

More information about the interchange-users mailing list