+1 On Thu, Aug 6, 2015 at 10:29 PM, Christine Poerschke (BLOOMBERG/ LONDON) <cpoersc...@bloomberg.net> wrote: > 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: dev@lucene.apache.org > To: Christine Poerschke (BLOOMBERG/ LONDON), dev@lucene.apache.org > At: Aug 6 2015 10:27:38 > > Hi Christine, > > On Wed, Aug 5, 2015 at 11:42 PM, Christine Poerschke (BLOOMBERG/ > LONDON) <cpoersc...@bloomberg.net> 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: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > >
-- Adrien --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org