Index: lucene/src/java/org/apache/lucene/analysis/Analyzer.java --- lucene/src/java/org/apache/lucene/analysis/Analyzer.java Mon Jun 06 14:39:26 2011 -0400 +++ lucene/src/java/org/apache/lucene/analysis/Analyzer.java Tue Jun 07 05:56:39 2011 -0400 @@ -22,11 +22,10 @@ import java.io.Closeable; import java.lang.reflect.Modifier; +import org.apache.lucene.index.IndexableField; import org.apache.lucene.util.CloseableThreadLocal; import org.apache.lucene.store.AlreadyClosedException; -import org.apache.lucene.document.Fieldable; - /** An Analyzer builds TokenStreams, which analyze text. It thus represents a * policy for extracting index terms from text. *

@@ -111,16 +110,16 @@ } /** - * Invoked before indexing a Fieldable instance if + * Invoked before indexing a IndexableField instance if * terms have already been added to that field. This allows custom * analyzers to place an automatic position increment gap between - * Fieldable instances using the same field name. The default value + * IndexbleField instances using the same field name. The default value * position increment gap is 0. With a 0 position increment gap and * the typical default token position increment of 1, all terms in a field, - * including across Fieldable instances, are in successive positions, allowing - * exact PhraseQuery matches, for instance, across Fieldable instance boundaries. + * including across IndexableField instances, are in successive positions, allowing + * exact PhraseQuery matches, for instance, across IndexableField instance boundaries. * - * @param fieldName Fieldable name being indexed. + * @param fieldName IndexableField name being indexed. * @return position increment gap, added to the next token emitted from {@link #tokenStream(String,Reader)} */ public int getPositionIncrementGap(String fieldName) { @@ -138,11 +137,13 @@ * @param field the field just indexed * @return offset gap, added to the next token emitted from {@link #tokenStream(String,Reader)} */ - public int getOffsetGap(Fieldable field) { - if (field.isTokenized()) + // nocommit cut to IndexableField + public int getOffsetGap(IndexableField field) { + if (field.isTokenized()) { return 1; - else + } else { return 0; + } } /** Frees persistent resources used by this Analyzer */ Index: lucene/src/java/org/apache/lucene/analysis/package.html --- lucene/src/java/org/apache/lucene/analysis/package.html Mon Jun 06 14:39:26 2011 -0400 +++ lucene/src/java/org/apache/lucene/analysis/package.html Tue Jun 07 05:56:39 2011 -0400 @@ -120,7 +120,7 @@ Applications usually do not invoke analysis – Lucene does it for them: