Apache Lucene open-source search software
LUCENE-8343: change suggesters to use Long instead of long weight during indexing, and double instead of long score at suggest time
Mike McCandless398074d0f878
diff --cc lucene/MIGRATE.txtindex 90ed4fc7baf,8467d7266bc..e0e70a36ccf--- a/lucene/MIGRATE.txt+++ b/lucene/MIGRATE.txt@@@ -76,45 -76,3 +76,50 @@@ separate queryThanks to other optimizations that were added to Lucene 8, this query will beable to efficiently select the top-scoring document without having to visitall matches.++## TopFieldCollector always assumes fillFields=true ##++Because filling sort values doesn't have a significant overhead, the fillFields+option has been removed from TopFieldCollector factory methods. Everything+behaves as if it was set to true.++## TopFieldCollector no longer takes a trackDocScores option ##++Computing scores at collection time is less efficient than running a second+request in order to only compute scores for documents that made it to the top+hits. As a consequence, the trackDocScores option has been removed and can be+replaced with the new TopFieldCollector#populateScores helper method.++## IndexSearcher.search(After) may return lower bounds of the hit count and TopDocs.totalHits is no longer a long ##++Lucene 8 received optimizations for collection of top-k matches by not visiting+all matches. However these optimizations won't help if all matches still need+to be visited in order to compute the total number of hits. As a consequence,+IndexSearcher's search and searchAfter methods were changed to only count hits+accurately up to 1,000, and Topdocs.totalHits was changed from a long to an+object that says whether the hit count is accurate or a lower bound of the+actual hit count.++## RAMDirectory, RAMFile, RAMInputStream, RAMOutputStream are deprecated ##++This RAM-based directory implementation is an old piece of code that uses inefficient+thread synchronization primitives and can be confused as "faster" than the NIO-based+MMapDirectory. It is deprecated and scheduled for removal in future versions of+Lucene. (LUCENE-8467, LUCENE-8438)++## LeafCollector.setScorer() now takes a Scorable rather than a Scorer ##++Scorer has a number of methods that should never be called from Collectors, for example+those that advance the underlying iterators. To hide these, LeafCollector.setScorer()+now takes a Scorable, an abstract class that Scorers can extend, with methods+docId() and score() (LUCENE-6228)++## Scorers must have non-null Weights ##++If a custom Scorer implementation does not have an associated Weight, it can probably+be replaced with a Scorable instead.++++## Suggesters now return Long instead of long for weight() during indexing, and double++instead of long at suggest time ##++++Most code should just require recompilation, though possibly requiring some added casts.