Hi Adrien,
No, it was just 2 documents in 1 segment yesterday. Just returned to this and
yes, you're right, placing the 2nd document into a 2nd segment (prior to the
force merge) seems to work, at least with the seed that previously caused the
test to fail.
If that sounds about right, i'd be happy to properly patch for this tomorrow.
Thanks,
Christine
---
a/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java
+++
b/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java
@@ -115,6 +115,8 @@ public class TestEarlyTerminatingSortingCollector extends
LuceneTestCase {
// the index, although want want a sorted segment so it needs to be
merged
iw.getReader().close(); // refresh
iw.addDocument(new Document());
+ iw.commit();
+ iw.addDocument(new Document());
iw.forceMerge(1);
}
else if (random().nextBoolean()) {
----- Original Message -----
From: [email protected]
To: Christine Poerschke (BLOOMBERG/ LONDON), [email protected]
At: Aug 6 2015 10:27:38
Hi Christine,
On Wed, Aug 5, 2015 at 11:42 PM, Christine Poerschke (BLOOMBERG/
LONDON) <[email protected]> wrote:
> Locally changed createRandomIndex to add not the 1 but 2 documents before the
> forceMerge. Still ends up with an unsorted segment:
Did you ensure that there is a reopen between these two documents are
added, so that we not only have 2 docs but also 2 segments? This can
be done eg. by calling iw.getReader().close(); on the
RandomIndexWriter.
--
Adrien
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]