Re: Adding custom field for sorting?

2008-03-27 Thread Chris Hostetter

: 1. Does Solr have a limit, e.g a % or a number to limit the number of
: document involved in sorting? or just sort all document?

it depends on the context of your question ... if you use any existing 
fieldtypes, then standard LUcnee sorting kicks in, and a Fieldcache is 
built containing the values of every doc no matter how many need to be 
sorted for a given query -- but that cache is reused for every sorted 
query.  if you write your own FieldType, you can do whatever you want in 
your SortField implentation.

: 2. Does the order in parameter 'sort' refer to the sorting order? (sort the
: first argument first, then the second and so on)

http://wiki.apache.org/solr/CommonQueryParameters#sort

-Hoss



Re: Adding custom field for sorting?

2008-03-26 Thread Vinci

Hi hossman,

Thank you for your reply.
Some question on sorting: 
1. Does Solr have a limit, e.g a % or a number to limit the number of
document involved in sorting? or just sort all document?
2. Does the order in parameter 'sort' refer to the sorting order? (sort the
first argument first, then the second and so on)

Thank you,
Vinci


hossman wrote:
 
 : 
 : Inspirited by the previous post, does it possible to add my custom field
 and
 : use it for sorting the search result?
 : If It is possible, what will be the step? Do I need to modify the source
 : code?
 
 adding a custom field is easy, just add the field/ to your schema.xml 
 and put data in it.
 
 adding a custom *fieldtype* is trickier ... compile your new fieldtype 
 against the solr code base, package it in a jar, and put that jar in the 
 plugin lib dir...
 
   http://wiki.apache.org/solr/SolrPlugins
 
 ...no need to modify any Solr code.
 
 
 
 
 -Hoss
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Adding-custom-field-for-sorting--tp16269118p16320156.html
Sent from the Solr - User mailing list archive at Nabble.com.



Adding custom field for sorting?

2008-03-25 Thread Vinci

Hi,

Inspirited by the previous post, does it possible to add my custom field and
use it for sorting the search result?
If It is possible, what will be the step? Do I need to modify the source
code?
 
Thank you,
Vinci
-- 
View this message in context: 
http://www.nabble.com/Adding-custom-field-for-sorting--tp16269118p16269118.html
Sent from the Solr - User mailing list archive at Nabble.com.