Index: lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html =================================================================== --- lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html (revision 1159870) +++ lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html (working copy) @@ -25,7 +25,7 @@
  • support N-gram fields
  • support phrase-unit highlighting with slops
  • need Java 1.5
  • -
  • highlight fields need to be TermVector.WITH_POSITIONS_OFFSETS
  • +
  • highlight fields need to be stored with Positions and Offsets
  • take into account query boost to score fragments
  • support colored highlight tags
  • pluggable FragListBuilder
  • @@ -95,7 +95,7 @@

    Step 2.

    In Step 2, Fast Vector Highlighter generates {@link org.apache.lucene.search.vectorhighlight.FieldTermStack}. Fast Vector Highlighter uses {@link org.apache.lucene.index.TermFreqVector} data -(must be stored {@link org.apache.lucene.document.Field.TermVector#WITH_POSITIONS_OFFSETS}) +(must be stored {@link org.apache.lucene.document.FieldType#setStoreTermVectorOffsets(boolean)} and {@link org.apache.lucene.document.FieldType#setStoreTermVectorPositions(boolean)}) to generate it. FieldTermStack keeps the terms in the user query. Therefore, in this sample case, Fast Vector Highlighter generates the following FieldTermStack:

    Index: lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java
    ===================================================================
    --- lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java	(revision 1159870)
    +++ lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java	(working copy)
    @@ -33,7 +33,6 @@
     import org.apache.lucene.analysis.MockAnalyzer;
     import org.apache.lucene.document.Document;
     import org.apache.lucene.document.Field;
    -import org.apache.lucene.document.Fieldable;
     import org.apache.lucene.document.StringField;
     import org.apache.lucene.document.TextField;
     import org.apache.lucene.index.codecs.CodecProvider;
    Index: lucene/src/java/org/apache/lucene/analysis/package.html
    ===================================================================
    --- lucene/src/java/org/apache/lucene/analysis/package.html	(revision 1159870)
    +++ lucene/src/java/org/apache/lucene/analysis/package.html	(working copy)
    @@ -120,7 +120,7 @@
       Applications usually do not invoke analysis – Lucene does it for them:
       
    * *

    - * If doc values are stored in addition to an indexed ({@link Index}) or stored - * ({@link Store}) value it's recommended to use the {@link IndexDocValuesField}'s - * {@link #set(AbstractField)} API: + * If doc values are stored in addition to an indexed ({@link FieldType#setIndexed(boolean)}) or stored + * ({@link FieldType#setStored(boolean)}) value it's recommended to use the {@link IndexDocValuesField}'s + * {@link #set(Field)} API: * *

      *  IndexDocValuesField field = new IndexDocValuesField(name);
    @@ -322,7 +322,7 @@
       }
     
       /**
    -   * Sets this {@link IndexDocValuesField} to the given {@link AbstractField} and
    +   * Sets this {@link IndexDocValuesField} to the given {@link Field} and
        * returns the given field. Any modifications to this instance will be visible
        * to the given field.
        */
    Index: lucene/src/java/org/apache/lucene/document/NumericField.java
    ===================================================================
    --- lucene/src/java/org/apache/lucene/document/NumericField.java	(revision 1159870)
    +++ lucene/src/java/org/apache/lucene/document/NumericField.java	(working copy)
    @@ -76,7 +76,7 @@
      *
      * 

    By default, a NumericField's value is not stored but * is indexed for range filtering and sorting. You can use - * the {@link #NumericField(String,Field.Store,boolean)} + * the {@link #NumericField(String, FieldType)} * constructor if you need to change these defaults.

    * *

    You may add the same field name as a NumericField to @@ -104,7 +104,7 @@ * default value, 4, was selected for a reasonable tradeoff * of disk space consumption versus performance. You can * use the expert constructor {@link - * #NumericField(String,int,Field.Store,boolean)} if you'd + * #NumericField(String,int,FieldType)} if you'd * like to change the value. Note that you must also * specify a congruent value when creating {@link * NumericRangeQuery} or {@link NumericRangeFilter}. Index: lucene/src/java/org/apache/lucene/document/package.html =================================================================== --- lucene/src/java/org/apache/lucene/document/package.html (revision 1159870) +++ lucene/src/java/org/apache/lucene/document/package.html (working copy) @@ -22,16 +22,16 @@

    The logical representation of a {@link org.apache.lucene.document.Document} for indexing and searching.

    The document package provides the user level logical representation of content to be indexed and searched. The -package also provides utilities for working with {@link org.apache.lucene.document.Document}s and {@link org.apache.lucene.document.Fieldable}s.

    -

    Document and Fieldable

    -

    A {@link org.apache.lucene.document.Document} is a collection of {@link org.apache.lucene.document.Fieldable}s. A - {@link org.apache.lucene.document.Fieldable} is a logical representation of a user's content that needs to be indexed or stored. - {@link org.apache.lucene.document.Fieldable}s have a number of properties that tell Lucene how to treat the content (like indexed, tokenized, - stored, etc.) See the {@link org.apache.lucene.document.Field} implementation of {@link org.apache.lucene.document.Fieldable} +package also provides utilities for working with {@link org.apache.lucene.document.Document}s and {@link org.apache.lucene.index.IndexableField}s.

    +

    Document and IndexableField

    +

    A {@link org.apache.lucene.document.Document} is a collection of {@link org.apache.lucene.index.IndexableField}s. A + {@link org.apache.lucene.index.IndexableField} is a logical representation of a user's content that needs to be indexed or stored. + {@link org.apache.lucene.index.IndexableField}s have a number of properties that tell Lucene how to treat the content (like indexed, tokenized, + stored, etc.) See the {@link org.apache.lucene.document.Field} implementation of {@link org.apache.lucene.index.IndexableField} for specifics on these properties.

    Note: it is common to refer to {@link org.apache.lucene.document.Document}s having {@link org.apache.lucene.document.Field}s, even though technically they have -{@link org.apache.lucene.document.Fieldable}s.

    +{@link org.apache.lucene.index.IndexableField}s.

    Working with Documents

    First and foremost, a {@link org.apache.lucene.document.Document} is something created by the user application. It is your job to create Documents based on the content of the files you are working with in your application (Word, txt, PDF, Excel or any other format.) @@ -45,7 +45,7 @@ to simplify indexing of numeric values (and also dates) for fast range range queries with {@link org.apache.lucene.search.NumericRangeQuery} (using a special sortable string representation of numeric values).

    The {@link org.apache.lucene.document.FieldSelector} class provides a mechanism to tell Lucene how to load Documents from -storage. If no FieldSelector is used, all Fieldables on a Document will be loaded. As an example of the FieldSelector usage, consider +storage. If no FieldSelector is used, all IndexableFields on a Document will be loaded. As an example of the FieldSelector usage, consider the common use case of displaying search results on a web page and then having users click through to see the full document. In this scenario, it is often the case that there are many small fields and one or two large fields (containing the contents of the original file). Before the FieldSelector, Index: lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java =================================================================== --- lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java (revision 1159870) +++ lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java (working copy) @@ -22,7 +22,6 @@ import java.util.Map; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; -import org.apache.lucene.document.Fieldable; import org.apache.lucene.index.FieldInfo.IndexOptions; import org.apache.lucene.index.codecs.FieldsConsumer; import org.apache.lucene.index.codecs.PostingsConsumer; Index: lucene/src/java/org/apache/lucene/index/ParallelReader.java =================================================================== --- lucene/src/java/org/apache/lucene/index/ParallelReader.java (revision 1159870) +++ lucene/src/java/org/apache/lucene/index/ParallelReader.java (working copy) @@ -18,7 +18,6 @@ */ import org.apache.lucene.document.Document; -import org.apache.lucene.document.Fieldable; import org.apache.lucene.index.codecs.PerDocValues; import org.apache.lucene.index.values.IndexDocValues; import org.apache.lucene.util.Bits; Index: lucene/src/java/org/apache/lucene/index/StoredFieldsWriter.java =================================================================== --- lucene/src/java/org/apache/lucene/index/StoredFieldsWriter.java (revision 1159870) +++ lucene/src/java/org/apache/lucene/index/StoredFieldsWriter.java (working copy) @@ -19,7 +19,6 @@ import java.io.IOException; -import org.apache.lucene.document.Fieldable; import org.apache.lucene.store.IOContext; import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.RamUsageEstimator; Index: lucene/src/java/org/apache/lucene/index/values/PerDocFieldValues.java =================================================================== --- lucene/src/java/org/apache/lucene/index/values/PerDocFieldValues.java (revision 1159870) +++ lucene/src/java/org/apache/lucene/index/values/PerDocFieldValues.java (working copy) @@ -19,14 +19,14 @@ import java.util.Comparator; import org.apache.lucene.document.IndexDocValuesField; -import org.apache.lucene.document.Fieldable; +import org.apache.lucene.index.IndexableField; // for javadoc import org.apache.lucene.index.codecs.DocValuesConsumer; import org.apache.lucene.util.BytesRef; /** * Per document and field values consumed by {@link DocValuesConsumer}. * @see IndexDocValuesField - * @see Fieldable#setDocValues(PerDocFieldValues) + * @see IndexableField#setDocValues(PerDocFieldValues) * * @lucene.experimental */ Index: lucene/src/java/org/apache/lucene/search/TFIDFSimilarity.java =================================================================== --- lucene/src/java/org/apache/lucene/search/TFIDFSimilarity.java (revision 1159870) +++ lucene/src/java/org/apache/lucene/search/TFIDFSimilarity.java (working copy) @@ -454,12 +454,8 @@ * norm(t,d) encapsulates a few (indexing time) boost and length factors: * *