Sure. Let's say that as Upayavira was saying you have in your index:

"paid: true/false
Then sort=paid desc, score desc"

In that case, paid=true and higher score would come up first.
After that you decide that you want to add a set of offers:
Offer 1: cost 1000 euros
Offer 2: cost 100 euros
Offer 3: cost 10 euros
and you expect that user1 (that pays more) appears before user 2 and 3. In
such case the field true/false won't be enough as you don't have any way to
sort user to have offer1 before offer2.

Let's say for sake of conversation that you decide to replace "paid" with a
numeric value paid=1 or 2 or 3. This solution would work better until you
decide to improve relevancy...at that point your new solution wouldn't suit
you anymore.
So "as it doesn't allow any meaningful customization " meant that such
solution is too rigid. Hope it makes sense.



On Thu, Oct 8, 2015 at 3:39 PM, Alessandro Benedetti <
benedetti.ale...@gmail.com> wrote:

> Is it possible to understand better this : "as it doesn't
> allow any meaningful customization " ?
>
> Cheers
>
> On 8 October 2015 at 15:27, Andrea Roggerone <
> andrearoggerone.o...@gmail.com
> > wrote:
>
> > Hi guys,
> > I don't think that sorting is a good solution in this case as it doesn't
> > allow any meaningful customization.I believe that the advised
> > QueryElevationComponent is one of the viable alternative. Another one
> would
> > be to boost at query time a particular field, like for instance paid.
> That
> > would allow you to assign different boosts to different values using a
> > function.
> >
> > On Thu, Oct 8, 2015 at 1:48 PM, Upayavira <u...@odoko.co.uk> wrote:
> >
> > > Or just have a field in your index -
> > >
> > > paid: true/false
> > >
> > > Then sort=paid desc, score desc
> > >
> > > (you may need to sort paid asc, not sure which way a boolean would
> sort)
> > >
> > > Question is whether you want to show ALL paid posts, or just a set of
> > > them. For the latter you could use result grouping on the paid field.
> > >
> > > Upayavira
> > >
> > > On Thu, Oct 8, 2015, at 01:34 PM, NutchDev wrote:
> > > > Hi Christian,
> > > >
> > > > You can take a look at Solr's  QueryElevationComponent
> > > > <https://wiki.apache.org/solr/QueryElevationComponent>  .
> > > >
> > > > It will allow you to configure the top results for a given query
> > > > regardless
> > > > of the normal lucene scoring. Also you can specify exclude document
> > list
> > > > to
> > > > exclude certain results for perticular query.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://lucene.472066.n3.nabble.com/How-to-show-some-documents-ahead-of-others-tp4233481p4233490.html
> > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > >
> >
>
>
>
> --
> --------------------------
>
> Benedetti Alessandro
> Visiting card - http://about.me/alessandro_benedetti
> Blog - http://alexbenedetti.blogspot.co.uk
>
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
>
> William Blake - Songs of Experience -1794 England
>

Reply via email to