-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Lucene 9.8.0 #2226
Upgrade to Lucene 9.8.0 #2226
Conversation
Let's go ahead and merge! (And I'll run all our regressions from scratch anyway...) |
@@ -78,7 +78,7 @@ public static void main(String[] args) throws Exception { | |||
|
|||
out.println("internal_docid\texternal_docid\tdoc_length\tunique_term_count\tlossy_doc_length\tlossy_unique_term_count"); | |||
for (int i = 0; i < numDocs; i++) { | |||
Terms terms = reader.getTermVector(i, Constants.CONTENTS); | |||
Terms terms = reader.termVectors().get(i, Constants.CONTENTS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally you'd fetch the reader.termVectors()
object only once, before the loop, and then reuse it in the loop. (And similarly to other places that rely on stored fields and term vectors.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will have another PR fix that in different places (and perhaps storedFields() too)
Upgrade Anserini to use Apache Lucene 9.8.0.