You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by davyme <me...@hotmail.com> on 2014/09/04 09:03:40 UTC

Solr sort by fixed id list

Hi, 

I'm search Solr by querying a list of id's. I want to get the solr search
results in the same order as the id list in the query. Can this be done? 

Thanks! 
Davy



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-sort-by-fixed-id-list-tp4156854.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr sort by fixed id list

Posted by davyme <me...@hotmail.com>.
And how would I do that?

What I've done until now, is sort by query function, with increasing boosts,
eg:
sort=query({!v=id:(1^1 OR 2^2 OR 3^3 OR 4^4 OR............ )})+asc

But this isn't very performant. When using +-7000 id's it will take about a
minute for Solr to find results.

I'm actually looking for a more effencient way.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-sort-by-fixed-id-list-tp4156854p4156888.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr sort by fixed id list

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
add increasing boosts.


On Thu, Sep 4, 2014 at 11:03 AM, davyme <me...@hotmail.com> wrote:

> Hi,
>
> I'm search Solr by querying a list of id's. I want to get the solr search
> results in the same order as the id list in the query. Can this be done?
>
> Thanks!
> Davy
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-sort-by-fixed-id-list-tp4156854.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>