Apache Solr open-source search software
LUCENE-3140: move fst to .. on trunk
Michael McCandless150d8b308930
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 6c26ecb4e34..1c63484c450 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -434,6 +434,12 @@ Bug fixes======================= Lucene 3.x (not yet released) ================+Changes in backwards compatibility policy++* LUCENE-3140: IndexOutput.copyBytes now takes a DataInput (superclass+ of IndexInput) as its first argument. (Robert Muir, Dawid Weiss,+ Mike McCandless)+Changes in runtime behavior* LUCENE-2834: the hash used to compute the lock file name when the@@ -441,6 +447,11 @@ Changes in runtime behaviorwill see a different lucene-XXX-write.lock in your lock directory.(Robert Muir, Uwe Schindler, Mike McCandless)+New Features++* LUCENE-3140: Added experimental FST implementation to Lucene.+ (Robert Muir, Dawid Weiss, Mike McCandless)+======================= Lucene 3.2.0 =======================Changes in backwards compatibility policydiff --git a/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexReader.java b/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexReader.javaindex 77dc6eda6de..9812d0d14d6 100644--- a/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexReader.java+++ b/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexReader.java@@ -33,11 +33,11 @@ import org.apache.lucene.store.Directory;import org.apache.lucene.store.IndexInput;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.CodecUtil;-import org.apache.lucene.util.automaton.fst.Builder;-import org.apache.lucene.util.automaton.fst.BytesRefFSTEnum;-import org.apache.lucene.util.automaton.fst.FST;-import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;-import org.apache.lucene.util.automaton.fst.Util; // for toDot+import org.apache.lucene.util.fst.Builder;+import org.apache.lucene.util.fst.BytesRefFSTEnum;+import org.apache.lucene.util.fst.FST;+import org.apache.lucene.util.fst.PositiveIntOutputs;+import org.apache.lucene.util.fst.Util; // for toDot/** See {@link VariableGapTermsIndexWriter}*diff --git a/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexWriter.java b/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexWriter.javaindex 9c1aba93f93..d10608879cb 100644--- a/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexWriter.java+++ b/lucene/src/java/org/apache/lucene/index/codecs/VariableGapTermsIndexWriter.java@@ -29,9 +29,9 @@ import org.apache.lucene.store.IndexOutput;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.CodecUtil;import org.apache.lucene.util.IOUtils;-import org.apache.lucene.util.automaton.fst.Builder;-import org.apache.lucene.util.automaton.fst.FST;-import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;+import org.apache.lucene.util.fst.Builder;+import org.apache.lucene.util.fst.FST;+import org.apache.lucene.util.fst.PositiveIntOutputs;/*** Selects index terms according to provided pluggablediff --git a/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java b/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.javaindex 5f5b68cb044..ab17022d9d3 100644--- a/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java+++ b/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java@@ -32,11 +32,11 @@ import org.apache.lucene.util.Bits;import org.apache.lucene.util.CharsRef;import org.apache.lucene.util.StringHelper;import org.apache.lucene.util.UnicodeUtil;-import org.apache.lucene.util.automaton.fst.Builder;-import org.apache.lucene.util.automaton.fst.BytesRefFSTEnum;-import org.apache.lucene.util.automaton.fst.FST;-import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;-import org.apache.lucene.util.automaton.fst.PairOutputs;+import org.apache.lucene.util.fst.Builder;+import org.apache.lucene.util.fst.BytesRefFSTEnum;+import org.apache.lucene.util.fst.FST;+import org.apache.lucene.util.fst.PositiveIntOutputs;+import org.apache.lucene.util.fst.PairOutputs;import java.io.IOException;import java.util.Comparator;diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/Builder.java b/lucene/src/java/org/apache/lucene/util/fst/Builder.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/Builder.javarename to lucene/src/java/org/apache/lucene/util/fst/Builder.javaindex 19949170936..b5736264e2d 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/Builder.java+++ b/lucene/src/java/org/apache/lucene/util/fst/Builder.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/ByteSequenceOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/ByteSequenceOutputs.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/ByteSequenceOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/ByteSequenceOutputs.javaindex f99c80f93c1..89690908201 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/ByteSequenceOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/ByteSequenceOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -25,6 +25,7 @@ import org.apache.lucene.util.BytesRef;/*** Output is a sequence of bytes, for each input term.+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/BytesRefFSTEnum.java b/lucene/src/java/org/apache/lucene/util/fst/BytesRefFSTEnum.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/BytesRefFSTEnum.javarename to lucene/src/java/org/apache/lucene/util/fst/BytesRefFSTEnum.javaindex 01ce6efe449..e3eff43551b 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/BytesRefFSTEnum.java+++ b/lucene/src/java/org/apache/lucene/util/fst/BytesRefFSTEnum.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -22,6 +22,7 @@ import java.io.IOException;import org.apache.lucene.util.BytesRef;/** Can next() and advance() through the terms in an FST+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/FST.java b/lucene/src/java/org/apache/lucene/util/fst/FST.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/FST.javarename to lucene/src/java/org/apache/lucene/util/fst/FST.javaindex 62c5199e77e..04428c6b356 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/FST.java+++ b/lucene/src/java/org/apache/lucene/util/fst/FST.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -23,7 +23,7 @@ import org.apache.lucene.store.DataInput;import org.apache.lucene.store.DataOutput;import org.apache.lucene.util.ArrayUtil;import org.apache.lucene.util.CodecUtil;-import org.apache.lucene.util.automaton.fst.Builder.UnCompiledNode;+import org.apache.lucene.util.fst.Builder.UnCompiledNode;// NOTE: while the FST is able to represent a non-final// dead-end state (NON_FINAL_END_NODE=0), the layres above@@ -32,6 +32,7 @@ import org.apache.lucene.util.automaton.fst.Builder.UnCompiledNode;/** Represents an FST using a compact byte[] format.* <p> The format is similar to what's used by Morfologik* (http://sourceforge.net/projects/morfologik).+ ** @lucene.experimental*/public class FST<T> {diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/FSTEnum.java b/lucene/src/java/org/apache/lucene/util/fst/FSTEnum.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/FSTEnum.javarename to lucene/src/java/org/apache/lucene/util/fst/FSTEnum.javaindex db1b7ddee12..8fbd4ea7f1d 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/FSTEnum.java+++ b/lucene/src/java/org/apache/lucene/util/fst/FSTEnum.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -23,6 +23,7 @@ import org.apache.lucene.util.RamUsageEstimator;import java.io.IOException;/** Can next() and advance() through the terms in an FST+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/IntSequenceOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/IntSequenceOutputs.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/IntSequenceOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/IntSequenceOutputs.javaindex 807bd836c59..8f3ad732814 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/IntSequenceOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/IntSequenceOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -25,6 +25,7 @@ import org.apache.lucene.util.IntsRef;/*** Output is a sequence of ints, for each input term.+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/IntsRefFSTEnum.java b/lucene/src/java/org/apache/lucene/util/fst/IntsRefFSTEnum.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/IntsRefFSTEnum.javarename to lucene/src/java/org/apache/lucene/util/fst/IntsRefFSTEnum.javaindex cb99f838a3d..cdd79c31c6a 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/IntsRefFSTEnum.java+++ b/lucene/src/java/org/apache/lucene/util/fst/IntsRefFSTEnum.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -22,6 +22,7 @@ import org.apache.lucene.util.IntsRef;import java.io.IOException;/** Can next() and advance() through the terms in an FST+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/NoOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/NoOutputs.javasimilarity index 97%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/NoOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/NoOutputs.javaindex edb9167e84c..40404a3fb90 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/NoOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/NoOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -22,6 +22,8 @@ import org.apache.lucene.store.DataOutput;/*** Use this if you just want to build an FSA.+ *+ * @lucene.experimental*/public final class NoOutputs extends Outputs<Object> {diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/NodeHash.java b/lucene/src/java/org/apache/lucene/util/fst/NodeHash.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/NodeHash.javarename to lucene/src/java/org/apache/lucene/util/fst/NodeHash.javaindex dde6409fc9a..a10376e7472 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/NodeHash.java+++ b/lucene/src/java/org/apache/lucene/util/fst/NodeHash.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/Outputs.java b/lucene/src/java/org/apache/lucene/util/fst/Outputs.javasimilarity index 97%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/Outputs.javarename to lucene/src/java/org/apache/lucene/util/fst/Outputs.javaindex 66efc3ff008..e0cabaf9e99 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/Outputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/Outputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -25,6 +25,7 @@ import org.apache.lucene.store.DataOutput;/*** Represents the outputs for an FST, providing the basic* algebra needed for the FST.+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/PairOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/PairOutputs.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/PairOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/PairOutputs.javaindex 7b6ead92a91..4cfd7f67915 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/PairOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/PairOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -24,10 +24,10 @@ import org.apache.lucene.store.DataOutput;/*** Pairs up two outputs into one.+ ** @lucene.experimental*/-public class PairOutputs<A,B> extends Outputs<PairOutputs.Pair<A,B>> {private final Pair<A,B> NO_OUTPUT;diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/PositiveIntOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/PositiveIntOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.javaindex 984324e07ce..616ecb54bd7 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/PositiveIntOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -27,6 +27,7 @@ import org.apache.lucene.store.DataOutput;* resulting FST is not guaranteed to be minimal! See* {@link Builder}. You cannot store 0 output with this* (that's reserved to mean "no output")!+ ** @lucene.experimental*/diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/TODO b/lucene/src/java/org/apache/lucene/util/fst/TODOsimilarity index 100%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/TODOrename to lucene/src/java/org/apache/lucene/util/fst/TODOdiff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/UpToTwoPositiveIntOutputs.java b/lucene/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/UpToTwoPositiveIntOutputs.javarename to lucene/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.javaindex 0c388d28710..1bae8f9a6cc 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/UpToTwoPositiveIntOutputs.java+++ b/lucene/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/Util.java b/lucene/src/java/org/apache/lucene/util/fst/Util.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/Util.javarename to lucene/src/java/org/apache/lucene/util/fst/Util.javaindex 6699ac6b342..2101f894def 100644--- a/lucene/src/java/org/apache/lucene/util/automaton/fst/Util.java+++ b/lucene/src/java/org/apache/lucene/util/fst/Util.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -23,7 +23,9 @@ import java.util.*;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.IntsRef;-/** Static helper methods */+/** Static helper methods+ *+ * @lucene.experimental */public final class Util {private Util() {}diff --git a/lucene/src/java/org/apache/lucene/util/automaton/fst/package.html b/lucene/src/java/org/apache/lucene/util/fst/package.htmlsimilarity index 100%rename from lucene/src/java/org/apache/lucene/util/automaton/fst/package.htmlrename to lucene/src/java/org/apache/lucene/util/fst/package.htmldiff --git a/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java b/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.javasimilarity index 99%rename from lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.javarename to lucene/src/test/org/apache/lucene/util/fst/TestFSTs.javaindex 672faff4345..2439e13efba 100644--- a/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java+++ b/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.java@@ -1,4 +1,4 @@-package org.apache.lucene.util.automaton.fst;+package org.apache.lucene.util.fst;/*** Licensed to the Apache Software Foundation (ASF) under one or more@@ -47,7 +47,7 @@ import org.apache.lucene.util.LineFileDocs;import org.apache.lucene.util.LuceneTestCase;import org.apache.lucene.util.UnicodeUtil;import org.apache.lucene.util._TestUtil;-import org.apache.lucene.util.automaton.fst.FST.Arc;+import org.apache.lucene.util.fst.FST.Arc;public class TestFSTs extends LuceneTestCase {@@ -1226,7 +1226,7 @@ public class TestFSTs extends LuceneTestCase {}}- // java -cp build/classes/test:build/classes/java:lib/junit-4.7.jar org.apache.lucene.util.automaton.fst.TestFSTs /x/tmp/allTerms3.txt out+ // java -cp build/classes/test:build/classes/java:lib/junit-4.7.jar org.apache.lucene.util.fst.TestFSTs /x/tmp/allTerms3.txt outpublic static void main(String[] args) throws IOException {int prune = 0;int limit = Integer.MAX_VALUE;diff --git a/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTLookup.java b/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTLookup.javaindex 47d81ec8fc5..22f81b090c8 100644--- a/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTLookup.java+++ b/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTLookup.java@@ -15,11 +15,11 @@ import java.util.List;import org.apache.lucene.util.IOUtils;import org.apache.lucene.util.IntsRef;-import org.apache.lucene.util.automaton.fst.Builder;-import org.apache.lucene.util.automaton.fst.FST;-import org.apache.lucene.util.automaton.fst.FST.Arc;-import org.apache.lucene.util.automaton.fst.NoOutputs;-import org.apache.lucene.util.automaton.fst.Outputs;+import org.apache.lucene.util.fst.Builder;+import org.apache.lucene.util.fst.FST;+import org.apache.lucene.util.fst.FST.Arc;+import org.apache.lucene.util.fst.NoOutputs;+import org.apache.lucene.util.fst.Outputs;import org.apache.lucene.search.suggest.Lookup;import org.apache.lucene.search.suggest.tst.TSTLookup;