Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
601 views
in Technique[技术] by (71.8m points)

lucene - Solr: Using function range query to sort & return computed value - performance

Is it possible to sort the result of function range query without passing the function itself in the Sort parameter? e.g.,

{!frange l=0.0 u=10000.0}sub(field(payment_double_mv,max),product(field(payment_double_mv,min),min(sub(field(price_double),2500),min(max(0.000000,field(deposit_double_mv,min)),field(deposit_double_mv,max)))))

i want the value of the function sub(field(payment_double_mv,max),product(field(payment_double_mv,min),min(sub(field(price_double),2500),min(max(0.000000,field(deposit_double_mv,min)),field(deposit_double_mv,max))))) sorted (asc or desc) but without passing this function to sort parameter. I suppose if I pass this function in Sort parameter, Solr/Lucene will re-compute this function and sort the docs accordingly.

Is it possible to prevent the re-computation in sort by considering the value computed in frange query's function itself?

question from:https://stackoverflow.com/questions/65877199/solr-using-function-range-query-to-sort-return-computed-value-performance

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...