: When sorting by (an integer) price field I need prices under 1 : standard deviation from the mean of the current result set to be : pushed to the end of the list.
I'm not 100% certain, but i *think* that with the new sort by function work granted added to the trunk a little while back that this would be possible. you would need a custom function modeled after something like RangeMapFloat (except you want the opposite behavior -- return the value if in range, otherwise return a default value) that first computes the meand and stddev of the result set (could probably repurpose some of the code from StatsComponent) and then use them to compute the min/max, giving every doc a score of Float.MAX_VALUE or Float.MIN_VALUE (depending on the sort order) if they are out of the range. -Hoss