yes, the collation tests work the same way, as they use pure binary tokens.
so their tests look like this: @Override public void setUp() throws Exception { super.setUp(); assumeFalse("preflex format only supports UTF-8 encoded bytes", "PreFlex".equals(CodecProvider.getDefault().getDefaultFieldCodec())); } On Wed, Mar 30, 2011 at 12:26 PM, Ryan McKinley <ryan...@gmail.com> wrote: > I have a test framework that extends LuceneTestCase and tests a bunch > of spatial indexing strategies. > > One strategy writes binary tokens (eventually this should be CSF) and > i'm getting an error when it hits the preflex codec. > > Is there a way to avoid this? > > > testSpatialSearch(org.apache.lucene.spatial.strategy.jts.JtsGeoStrategyTestCase) > Time elapsed: 0.231 sec <<< FAILURE! > java.lang.AssertionError > at org.apache.lucene.util.UnicodeUtil.UTF8toUTF16(UnicodeUtil.java:339) > at > org.apache.lucene.index.codecs.preflexrw.TermInfosWriter.compareToLastTerm(TermInfosWriter.java:136) > at > org.apache.lucene.index.codecs.preflexrw.TermInfosWriter.add(TermInfosWriter.java:166) > at > org.apache.lucene.index.codecs.preflexrw.PreFlexFieldsWriter$PreFlexTermsWriter.finishTerm(PreFlexFieldsWriter.java:194) > at > org.apache.lucene.index.FreqProxTermsWriter.appendPostings(FreqProxTermsWriter.java:337) > at > org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:112) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org