dweiss commented on PR #14350: URL: https://github.com/apache/lucene/pull/14350#issuecomment-2724062564
I don't know Unicode as well as Rob so I can't say what these alternate case folding equivalence classes are... but they definitely don't have a "canonical" representation with regard to Character.toLowercase. Consider the killer Turkish dotless i, for example: ``` public void testCornerCase() throws Exception { List<BytesRef> terms = Stream.of( "aIb", "aıc") .map(s -> { int[] lowercased = s.codePoints().map(Character::toLowerCase).toArray(); return new String(lowercased, 0, lowercased.length); }) .map(LuceneTestCase::newBytesRef) .sorted() .collect(Collectors.toCollection(ArrayList::new)); Automaton a = build(terms, false, true); System.out.println(a.toDot()); assertTrue(a.isDeterministic()); } ``` which yields:  It would take some kind of character normalization filter on both the index and automaton building/expansion side for this to work. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org