The custom Field type similar to RandomSortField is definitely the way
to go over a custom component since it's much less invasive - then
everything else like distributed search should work.

But see SOLR-1111... I'm in the process of converting Solr to use the
new FieldComparatorSource.

-Yonik
http://www.lucidimagination.com



On Tue, May 26, 2009 at 9:25 AM, Marc Sturlese <marc.sturl...@gmail.com> wrote:
>
> Hey there,
>
> I want to implement a custom sort coding my own SortComparatorSource. The
> sorter would sort the results doing some calculations of some document
> attributes witch I have loaded previously from a DB at the solr core init. I
> mean, I have a preloaded hash with some attributes per doc id and I want to
> use them to implement the sorting.
> I have considered two options:
>
> First would be to implement a custom field similar to the solr
> RandomSortField and when search requests are done I would tell solr to sort
> using this custom field.
>
> The other option would be to plug a component (wich would extend from
> SearchComponent) and do the custom sort in the prepare method.
>
> Any advice witch is the most optimal way to do that?
>
> Thanks in advance.
> --
> View this message in context: 
> http://www.nabble.com/Custom-sort-tp23722921p23722921.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to