lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <>
Subject Re: Using Customized sorting in Solr
Date Thu, 26 Apr 2012 22:39:17 GMT

How about trying grouping with paging?
First you do 

That gives you one listing per advertiser, sorted the way you like.
Then to grab the next batch of ads, you go group.offset=1 etc etc.

Jan Høydahl, search solution architect
Cominvent AS -
Solr Training -

On 26. apr. 2012, at 08:10, solr user wrote:

> Hi,
> We are planning to move the search of one of our listing based portal to
> solr/lucene search server from sphinx search server. But we are facing a
> challenge is porting customized sorting being used in our portal. We only
> have last 60 days of data live.The algorithm is as follows:-
>   1.  Put all listings into 54 buckets – (Date bucket for 60 days)  i.e.
>   buckets of 7day, 1 day, 1 day……
>   2.  For each date bucket we make 2 buckets –(Paid / free bucket)
>   3.  For each paid / free bucket cycle the advertisers on uniqueness basis
>                  i.e. inside a bucket the ordering should be 1st listing
> of each advertiser, 2nd listing of each advertiser and so on
>                  in other words within a *sub-bucket* second listing of an
> advertiser will be displayed only after first listing of all advertiser has
> been displayed.
> For taking care of point 1 and 2 we have created a field named bucket_index
> at the time of indexing the data and get the results sorted by this index,
> but we are not able to find a way to create a sort field at index time or
> think of a sort function for the point no 3.  Please suggest if there is a
> way to do so in solr.
> Tia,
> BC Rathore

View raw message