msfroh commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2498931094
Closing in favor of https://github.com/apache/lucene/pull/14012
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use th
msfroh closed pull request #13987: Update lastDoc in ScoreCachingWrappingScorer
URL: https://github.com/apache/lucene/pull/13987
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
jpountz commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2498260663
> In that case, the unit test that I added can be removed
This works for me. Sorry for putting you on the wrong track by suggesting
that a test is added, it took me a while to unde
msfroh commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2494486990
> @msfroh FWIW I'm happy to merge this PR when we remove the double call to
LeafCollector#collect on the same doc ID in tests.
In that case, the unit test that I added can be remove
jpountz commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2494272651
@msfroh FWIW I'm happy to merge this PR when we remove the double call to
LeafCollector#collect on the same doc ID in tests.
--
This is an automated message from the Apache Git Service
jpountz commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1846948010
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.cl
msfroh commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1842729383
##
lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java:
##
@@ -359,7 +359,7 @@ public void testTotalHitsWithScore() throws Exception {
leafC
msfroh commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1841125795
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.clo
msfroh commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1841119813
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.clo
mikemccand commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1840911855
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir
jpountz commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1840904596
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.cl
msfroh commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1840841444
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.clo
msfroh commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1840841444
##
lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java:
##
@@ -157,4 +157,40 @@ public void testGetScores() throws Exception {
ir.clo
msfroh commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2472044035
I think the caching worked fine, albeit in a funny way.
When you call `collect()` with any valid doc ID, it invalidates the cache,
causing scores to be computed. After the score wa
msfroh commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2471331326
Luckily, this is a Lucene 10-only bug (from when `docId()` was removed from
`Scorable`).
I came across it when updating OpenSearch to support Lucene 10 and needed to
refactor some
mikemccand commented on code in PR #13987:
URL: https://github.com/apache/lucene/pull/13987#discussion_r1837971840
##
lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java:
##
@@ -359,7 +359,7 @@ public void testTotalHitsWithScore() throws Exception {
l
mikemccand commented on PR #13987:
URL: https://github.com/apache/lucene/pull/13987#issuecomment-2470331708
Wow, good catch @msfroh. Could we maybe add a new test case that explicitly
confirms that the wrapped `Scorable`'s `score` method is indeed only called
once even if the outer user ca
msfroh opened a new pull request, #13987:
URL: https://github.com/apache/lucene/pull/13987
### Description
I noticed that ScoreCachingWrappingScorer never updates lastDoc, so it's
always -1. Technically, it's probably fine, since it still ends up returning
the same score for multiple
18 matches
Mail list logo