Skip to content

Commit

Permalink
Fix CheckIndex to correctly flag the automaton as binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpountz committed Dec 20, 2023
1 parent 5152051 commit 91002d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ private static Status.TermIndexStatus checkFields(
startTerm = new BytesRef();
checkTermsIntersect(terms, automaton, startTerm);

automaton = Automata.makeAnyBinary();
automaton = Automata.makeNonEmptyBinary();
startTerm = new BytesRef(new byte[] {'l'});
checkTermsIntersect(terms, automaton, startTerm);

Expand Down Expand Up @@ -2369,8 +2369,8 @@ private static void checkTermsIntersect(Terms terms, Automaton automaton, BytesR
throws IOException {
TermsEnum allTerms = terms.iterator();
automaton = Operations.determinize(automaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
CompiledAutomaton compiledAutomaton = new CompiledAutomaton(automaton);
ByteRunAutomaton runAutomaton = new ByteRunAutomaton(automaton);
CompiledAutomaton compiledAutomaton = new CompiledAutomaton(automaton, false, true, true);
ByteRunAutomaton runAutomaton = new ByteRunAutomaton(automaton, true);
TermsEnum filteredTerms = terms.intersect(compiledAutomaton, startTerm);
BytesRef term;
if (startTerm != null) {
Expand Down

0 comments on commit 91002d0

Please sign in to comment.