: I am trying to write some code to read rank data from external db, I saw
: some example done using database -
: 
http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.html,
        ...
: But is there any way to pass parameter or choose different database during
: FieldComparator based on query. Lets say I want to pass versions, the sort
: order in version 1 will be different then sort order in v2.

I would suggest that instead of trying to implement a custom sort, you 
instead look into implementing a custom ValueSourceParser -- this lets 
you define custom functions that can take input, and then use the 
function input to specify your query time variations.

any registered function name can be sorted on.

I think this article is still fairly accurate in terms of the internal 
APIs you need to implemnt...

http://java.dzone.com/news/how-write-custom-solr

...or if you liked Sujit's blog on custom sorting, he has a more recent 
one on custom functions...

http://sujitpal.blogspot.com/2013/03/solr-custom-ranking-with-function.html


-Hoss

Reply via email to