[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Solr sorting question to boost a certain field first
From:       Mike Austin <mike.austin () juggle ! com>
Date:       2012-02-29 22:26:20
Message-ID: CALJ8bMndOYecE07Avgz5KcAybtfsBKz_ukvZrhp3ikX2-WcfDQ () mail ! gmail ! com
[Download RAW message or body]


Boom!

This works: sort=map(query($qq,-1),0, 99999999,
1)+desc,score+desc&qq=domain:domainA

Thanks,
Mike

On Wed, Feb 29, 2012 at 3:45 PM, Mike Austin <mike.austin@juggle.com> wrote:

> I have content that I index for several different domains.  What I'd like
> to do is have all search results found for domainA returned first and
> results for domainB,C,D..etc.. returned second.  I could do two different
> searches but was wondering if there was a way to only do one query but
> return results from a certain domain first followed by results from the
> rest of the domains second.
>
> I thought about trying to boost but I question if the boost would always
> make domainA return first?  Could someone please suggest a way to do this?
> Thanks!
>
> Example: Query for "apple" on "domainA" plus give me other domains that
> have "apple" in them also
>
> Example results:
> 1. DomainA, score .85
> 2. DomainA, score .84
> 3. DomainA, score .75
> 4. DomainA, score .65
> 5. DomainA, score .55
> 6. DomainA, score .35
> ------- now network results --------
> 7. DomainC, score .94
> 8. DomainE, score .75
> 9. DomainB, score .68
> 10. DomainG, score .55
> 11. DomainC, score .35
>
> Thanks,
> Mike
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic