lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Solr - Read sort data from external source
Date Fri, 25 Oct 2013 23:46:06 GMT

: I am trying to write some code to read rank data from external db, I saw
: some example done using database -
: 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...

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


View raw message