I think sorting should work too, as I suggested before. In this case
(because by coincidence you need alphabetic sort on the type) "sort=type
asc, score desc" should work.

If you need to add other types, maybe add an int field that represents how
you would like those to be sorted. between types, the regular score will be
used for sorting.

Tomás

On Tue, Oct 16, 2012 at 1:18 PM, Walter Underwood <wun...@wunderwood.org>wrote:

> Here is an approach that avoids the IDF problem.
>
> Add another field, perhaps named "priority". In that field, put a boost
> value, like 100 for allele docs, 10 for mi_attempt docs, and so on. In the
> boost part of the query, use the value of that field boost=priority.
>
> If you cannot change the index, you may be able do the same thing with if
> statements in the function query, see
> http://wiki.apache.org/solr/FunctionQuery
>
> This is a common design request, to show all results of type A before all
> results of type B, and it has a common and severe problem. If your query
> term is common, the user will see 10,000 hits of type A, all the way to the
> least relevant, before they see the highly-relevant first hit of type B.
> So, the search is broken for all common query terms and there is nothing
> the user can do to fix it.
>
> Instead, use a smaller boost, maybe a bit more than a tiebreaker, but not
> enough to force a total ordering. You may also want to use facets or fixed
> filters, so that users can select only alleles or only my_attempts.
>
> wunder
>
> On Oct 16, 2012, at 8:21 AM, Asfand Qazi wrote:
>
> > On 16/10/12 16:15, Walter Underwood wrote:
> >> Why do you want that ordering? That isn't what Solr is designed to do.
> It is designed for relevance. I expect that idf (the rarity of the terms)
> is being used in the ordering. "mi_attempt" is probably much more rare than
> "allele".
> >>
> >> If you want that strict ordering, I recommend doing three queries and
> concatenating the three result sets.
> >>
> >> wunder
> >
> > I want that ordering because alleles are more 'important' to a biologist
> than an mi_attempt, which is 'more important' than a phenotype_attempt.
> >
> > If Solr isn't designed for this kind of stuff, then I will do the
> sorting manually after I have received all the documents.  I could give
> huge boost values to each term, but then I guess I'm just using a
> sledgehammer to crack a nut.
> >
> > Thanks
> >
> > --
> > Regards,
> >      Asfand Yar Qazi
> >      Team 87 - High Throughput Gene Targeting
> >      Wellcome Trust Sanger Institute
> >
> >
> >
> > --
> > The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a company
> registered in England with number 2742969, whose registered office is 215
> Euston Road, London, NW1 2BE.
>
> --
> Walter Underwood
> wun...@wunderwood.org
>
>
>
>

Reply via email to