gaobinlong commented on code in PR #16247:
URL: https://github.com/apache/lucene/pull/16247#discussion_r3426721094
##########
lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGroupingSearch.java:
##########
@@ -110,10 +110,17 @@ public void testBasic() throws Exception {
// 6 -- no author field
doc = new Document();
doc.add(new TextField("content", "random word stuck in alot of other
text", Field.Store.YES));
- doc.add(new Field("id", "6", customType));
- doc.add(new StringField("groupend", "x", Field.Store.NO));
+ doc.add(new Field("id", "7", customType));
+ documents.add(doc);
- w.addDocument(doc);
+ // 7 -- no match document
+ doc = new Document();
+ doc.add(new TextField("content", "no-match", Field.Store.YES));
+ doc.add(new Field("id", "8", customType));
+ doc.add(new StringField("groupend", "x", Field.Store.NO));
+ documents.add(doc);
+ w.addDocuments(documents);
+ documents.clear();
Review Comment:
This is to verify the unmatched doc never be cached and never be in the
search results, since all other docs are matched by the query.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]