SOLR to Elastic NEWEST


(Bill) #1

Solr to Elastic.

How do I covert:

{!boost b=recip(ms(NOW/HOUR,%s),3.16e-11,%s,%s)}

Which is to sort by NEWEST - want to change this to work on Elastic?


Solr to Elastic
(Bill) #2

Not sure how to do a dynamic ms(NOW/HOUR) and have low values for 10 years ago, and higher values for times closer to now.

Something like the following with exponentialDecayFunction might work, but the math is making it hard to debug.

filterFunctionBuilders.add(
new FunctionScoreQueryBuilder.FilterFunctionBuilder(ScoreFunctionBuilders.exponentialDecayFunction(elasticField, new Date().getTime(), scale, 0, .1).setWeight(boost))
);


(Bill) #3

bump ?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.