I think you misunderstand. The buckets are NOT the votes,
they are the relevance scores from the search. So your
search returns relevance scores (raw) from, say 1 - 100.
You could collect the results in 5 buckets and sort
by vote *within* the bucket. So the user still sees
the most relevant documents at the top, but within
that most relevant quintile she sees the order
munged a bit by vote. The thread I mentioned talks
about how to accomplish this with a FieldSortedHitQueue (?)
and a HitCollector.

Since you're massaging the sort however you want,
negative votes should be do-able.

Best
Erick

On 9/5/07, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
>
> Well a sort would remove the relevance portion of the query, which I
> really
> don't want to do.  I tried using  the ValueSourceQuery but it doesn't seem
> to be able to handle negative vote values.  Buckets sound interesting but
> since there is no max voting value it would be difficult to build the max
> bucket.
>
>
> Erick Erickson wrote:
> >
> > What would happen if you sorted by vote? Perhaps within ranges
> > of scores? There's a thread in the list in response to a post I
> > made about "buckets" that might be relevant....
> >
> > Otherwise, you might think about boosting the relevant
> > parts of the document at *index* time based on the value
> > of vote....
> >
> > Erick
> >
> > On 9/5/07, Adam Ruggles <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> I'm trying to find a query that would boost a document based on a field
> >> in
> >> the document.
> >>
> >> I have a simple index with title, description, date, ... I also have a
> >> field
> >> called vote.  I want items that have been voted higher to be ranked as
> >> higher in the search results.  Is there a query and or filter I could
> use
> >> to
> >> accomplish this?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-boost-a-document-based-on-a-field-in-the-document-tf4384816.html#a12500483
> >> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-boost-a-document-based-on-a-field-in-the-document-tf4384816.html#a12506195
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to