Re: Add custom comparator for field(s) for Sorting.

2020-08-07 Thread Erick Erickson
n to sortMissingFirst/Last on the string field, you’d probably want sortMissingLast. Best, Erick > On Aug 7, 2020, at 12:47 PM, Pushkar Raste wrote: > > Hi, > Is it possible to add a custom comparator to a field for sorting. e.g. > let's say I have field 'name' an

Add custom comparator for field(s) for Sorting.

2020-08-07 Thread Pushkar Raste
Hi, Is it possible to add a custom comparator to a field for sorting. e.g. let's say I have field 'name' and following documents { id : "doc1", name : "1" } { id : "doc2", name : "S1" } { id : "doc2", name : "S2

Re: Custom comparator

2010-07-20 Thread Chris Hostetter
setting asside for a moment my opionin that trying to do cut offs relative the max Score is a bad idea in general... 1) you're definitley not going to know the "topScore" until all of the matching docs are collected. 2) Solr really doesn't make it easy to plug in a custo

Re: Custom comparator

2010-07-16 Thread dan sutton
t; 1%. > > HTH > Erick > > On Thu, Jul 15, 2010 at 10:02 AM, dan sutton wrote: > > > Hi, > > > > I have a requirement to have a custom comparator that keep the top N > > documents (chosen by some criteria) but only if their score is more then > > e.g.

Re: Custom comparator

2010-07-15 Thread Rodrigo Rezende
eDoc each of which > has its score. So you can just let the underlying code get the > top N documents, and throw out any that don't score above > 1%. > > HTH > Erick > > On Thu, Jul 15, 2010 at 10:02 AM, dan sutton wrote: > >> Hi, >> >> I have a

Re: Custom comparator

2010-07-15 Thread Erick Erickson
above 1%. HTH Erick On Thu, Jul 15, 2010 at 10:02 AM, dan sutton wrote: > Hi, > > I have a requirement to have a custom comparator that keep the top N > documents (chosen by some criteria) but only if their score is more then > e.g. 1% of the maxScore. > > Looking at Sol

Custom comparator

2010-07-15 Thread dan sutton
Hi, I have a requirement to have a custom comparator that keep the top N documents (chosen by some criteria) but only if their score is more then e.g. 1% of the maxScore. Looking at SolrIndexSearcher.java, I was hoping to have a custom TopFieldCollector.java to return these via TopFieldCollector