Cuong,

I think you will need some manipulation beyond solr queries. You should
separate the results by your site criteria after retrieving them. After
that, you could cache the results on your application and randomize the
lists every time you render the a page.

I don't know if solr has collapsing capabilities but it has any beyond
faceting, it would be a great boost to your work.

2008/6/3 climbingrose <[EMAIL PROTECTED]>:

> Hi Alexander,
>
> Thanks for your suggestion. I think my problem is a bit different from
> yours. We don't have any sponsored words but we have to retrieve sponsored
> results directly from the index. This is because a site can have 60,000
> products which is hard to insert/update keywords. I can live with that by
> issuing a separate query to fetch sponsored results. My problem is to
> equally distribute sponsored results between sites so that each site will
> have an opportunity to show their sponsored results no matter how many
> products they have. For example, if site A has 60000 products, site B has
> only 2000 then sponsored products from site B will have a very small chance
> to be displayed.
>
>
> On Wed, Jun 4, 2008 at 2:56 AM, Alexander Ramos Jardim <
> [EMAIL PROTECTED]> wrote:
>
> > Cuong,
> >
> > I have implemented sponsored words for a client. I don't know if my
> working
> > can help you but I will expose it and let you decide.
> >
> > I have an index containing products entries that I created a field called
> > sponsored words. What I do is to boost this field , so when these words
> are
> > matched in the query that products appear first on my result.
> >
> > 2008/6/3 climbingrose <[EMAIL PROTECTED]>:
> >
> > > Hi all,
> > >
> > > I'm trying to implement "sponsored results" in Solr search results
> > similar
> > > to that of Google. We index products from various sites and would like
> to
> > > allow certain sites to promote their products. My approach is to query
> a
> > > slave instance to get sponsored results for user queries in addition to
> > the
> > > normal search results. This part is easy. However, since the number of
> > > products indexed for each sites can be very different (100, 1000, 10000
> > or
> > > 60000 products), we need a way to fairly distribute the sponsored
> results
> > > among sites.
> > >
> > > My initial thought is utilising field collapsing patch to collapse the
> > > search results on siteId field. You can imagine that this will create a
> > > series of "buckets of results", each bucket representing results from a
> > > site. After that, 2 or 3 buckets will randomly be selected from which I
> > > will
> > > randomly select one or two results from. However, since I want these
> > > sponsored results to be relevant to user queries, I'd like only want to
> > > have
> > > the first 30 results in each buckets.
> > >
> > > Obviously, it's desirable that if the user refreshes the page, new
> > > sponsored
> > > results will be displayed. On the other hand, I also want to have the
> > > advantages of Solr cache.
> > >
> > > What would be the best way to implement this functionality? Thanks.
> > >
> > > Cheers,
> > > Cuong
> > >
> >
> >
> >
> > --
> > Alexander Ramos Jardim
> >
>
>
>
> --
> Regards,
>
> Cuong Hoang
>



-- 
Alexander Ramos Jardim

Reply via email to