Skip to content

Apache Lucene open-source search software

add a temporary workaround for the sort order problem

Robert Muirf753fb287359
diff --git a/lucene/src/java/org/apache/lucene/search/AutomatonTermsEnum.java b/lucene/src/java/org/apache/lucene/search/AutomatonTermsEnum.java
index 852ed680524..69ac17e6a7b 100644
--- a/lucene/src/java/org/apache/lucene/search/AutomatonTermsEnum.java
+++ b/lucene/src/java/org/apache/lucene/search/AutomatonTermsEnum.java
@@ -158,6 +158,11 @@ public class AutomatonTermsEnum extends FilteredTermsEnum {
// seek to the next possible string;
if (nextString()) {
// reposition
+
+ // FIXME: this is really bad to turn off
+ // but it cannot work correctly until terms are in utf8 order.
+ linear = false;
+
if (linear)
setLinear(infinitePosition);
return seekBytesRef;