snoopdave commented on code in PR #226:
URL: https://github.com/apache/roller/pull/226#discussion_r4394673751
##########
app/src/main/java/org/apache/roller/weblogger/business/search/lucene/LuceneIndexManager.java:
##########
@@ -466,8 +466,10 @@ static SearchResultList convertHitsToEntryList(
// maybe null if search result returned inactive user
// or entry's user is not the requested user.
- // but don't return future posts
- if (entry != null && entry.getPubTime().before(now)) {
+ // The index can lag behind the entry, so return only entries
+ // that are published now, and not future posts
+ if (entry != null && entry.isPublished()
Review Comment:
🤖Claude: fixed by filtering hits to entries that are published now before
computing offset and limit, so only those use page slots. IndexManagerTest now
returns the newest match to draft and checks that page 0 with page size 1 shows
the older published entry; that assertion fails on the previous head and passes
now (51c1f9dc8). Note: each search now loads the entries for all hits (up to
the existing 500-hit cap) to page over them.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]