[Xapian-discuss] How to build a shopping product categorization system?

oscaruser at programmer.net oscaruser at programmer.net
Sun Jul 30 07:23:50 BST 2006


Good info, thanks, giving it a go...

> ----- Original Message -----
> From: "James Aylett" <james-xapian at tartarus.org>
> To: xapian-discuss at lists.xapian.org
> Subject: Re: [Xapian-discuss] How to build a shopping product categorization	system?
> Date: Sat, 29 Jul 2006 23:05:01 +0100
> 
> 
> On Tue, Jul 25, 2006 at 10:25:00AM -0800, oscaruser at programmer.net wrote:
> 
> > We have a predefined tree of categories e.g. Apparel & 
> > Accessories -> Clothing -> Women's Apparel -> Business
> > 	  Casual -> Blazers
> >
> > Is there a way to modify the index script (passed to scriptindex) to
> > associate this information with the URL or Xapian record such that
> > when a search is executed against a search term, the categorization
> > information appears in a structured fashion defined by our omega
> > template?
> 
> If you turn it into a document data field, you can use $split to chop
> it up. Say you store the above as "Apparel &
> Accessories/Clothing/...", you could have:
> 
> categories: field=categories
> 
> $list{$map{$split{/, $field{categories}},<span
> class='category'>$html{$_}</span>}, -> }
> 
> If you stored tokens instead of strings you could turn them into links
> as well by using a $setmap{}. (You can also localize that way, if you
> need to.)
> 
> James
> 
> --
> /--------------------------------------------------------------------------\
>    James Aylett                                                  xapian.org
>    james at tartarus.org                               uncertaintydivision.org
> 
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss

>


-- 
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/




More information about the Xapian-discuss mailing list