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 shawnliu <li...@hotmail.com> on 2008/04/10 12:31:36 UTC

How to custom solr sort?

I have inherited a new class from the org.apache.solr.schema.StrField and
customed a new sort algorithm by implementing the SortComparatorSource
interface.Then to export the jar file to the solr lib directory, and
configure the schema.xml file.But when I test the new feature, It does't
work at all.Can you give some suggestions?Thanks.
-- 
View this message in context: http://www.nabble.com/How-to-custom-solr-sort--tp16607351p16607351.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to custom solr sort?

Posted by Chris Hostetter <ho...@fucit.org>.
: I have inherited a new class from the org.apache.solr.schema.StrField and
: customed a new sort algorithm by implementing the SortComparatorSource
: interface.Then to export the jar file to the solr lib directory, and
: configure the schema.xml file.But when I test the new feature, It does't
: work at all.Can you give some suggestions?Thanks.

1) you have to be more specific about "does't work at all" ... does it 
cause an error? do the documents come back in some other order? etc...

2) can you show us the code for the "getSortField" method of your StrField 
subclass?




-Hoss