Sorry I just saw your other message that has a bit more information. Actually you do not need the distance for displaying purposes but both for filtering and custom scoring. That said, I think recomputing the distances is still the way to go. Geo-distance filters have optimizations that allow them to find matching documents without computing distances at all most of time, so computing the distance for your scoring function may not waste CPU since the distance was not computed for filtering.
Le mar. 17 janv. 2017 à 19:36, Adrien Grand <jpou...@gmail.com> a écrit : > Maybe recomputing the distance is not too bad? Say you have millions of > documents and only ask for the top 100, then recomputing distances for that > top 100 would be much cheaper than what you already had to do to compute > the scores. > > Le ven. 13 janv. 2017 à 18:08, sidhant92 <sidhan...@hotmail.com> a écrit : > > I am using custom score provider for scoring lucene documents manually. I > am > doing many calculations in custom score provider to calculate the score. > For > example on of them is distance. So now once the scoring is done i would > like > to know that distance as well. Instead of computing it again cant i > directly > get that value after scoring as its already calculated. > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Get-values-in-custom-scoring-during-document-retrieval-tp4313853.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >