lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1157913 - in /lucene/dev/branches/fieldtype/lucene: contrib/highlighter/src/java/org/apache/lucene/search/highlight/ contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/ contrib/memory/src/java/org/apache/lucene/index/mem...
Date Mon, 15 Aug 2011 17:11:30 GMT
Author: mikemccand
Date: Mon Aug 15 17:11:29 2011
New Revision: 1157913

URL: http://svn.apache.org/viewvc?rev=1157913&view=rev
Log:
LUCENE-2308: javadocs and other small cleanups

Removed:
    lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document2/
Modified:
    lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
    lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
    lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
    lucene/dev/branches/fieldtype/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorResult.java
    lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
    lucene/dev/branches/fieldtype/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
    lucene/dev/branches/fieldtype/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/Syns2Index.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/analysis/package.html
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/Field.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/package.html
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/FieldInfos.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/IndexReader.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/TermFreqVector.java
    lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/search/Similarity.java
    lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestIndexReader.java

Modified: lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
Mon Aug 15 17:11:29 2011
@@ -60,7 +60,7 @@ public class TokenSources {
    * @param analyzer The analyzer to use for creating the TokenStream if the
    *        vector doesn't exist
    * @return The {@link org.apache.lucene.analysis.TokenStream} for the
-   *         {@link org.apache.lucene.document.Fieldable} on the
+   *         {@link org.apache.lucene.index.IndexableField} on the
    *         {@link org.apache.lucene.document.Document}
    * @throws IOException if there was an error loading
    */

Modified: lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
Mon Aug 15 17:11:29 2011
@@ -21,6 +21,7 @@ import java.util.Collections;
 import java.util.LinkedList;
 import java.util.Set;
 
+import org.apache.lucene.document.FieldType;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.TermFreqVector;
 import org.apache.lucene.index.TermPositionVector;
@@ -46,8 +47,12 @@ public class FieldTermStack {
   //  Directory dir = new RAMDirectory();
   //  IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Version.LUCENE_CURRENT,
analyzer));
   //  Document doc = new Document();
-  //  doc.add( new Field( "f", "a a a b b c a b b c d e f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS
) );
-  //  doc.add( new Field( "f", "b a b a f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS
) );
+  //  FieldType ft = new FieldType(TextField.TYPE_STORED);
+  //  ft.setStoreTermVectors(true);
+  //  ft.setStoreTermVectorOffsets(true);
+  //  ft.setStoreTermVectorPositions(true);
+  //  doc.add( new Field( "f", ft, "a a a b b c a b b c d e f" ) );
+  //  doc.add( new Field( "f", ft, "b a b a f" ) );
   //  writer.addDocument( doc );
   //  writer.close();
     
@@ -67,7 +72,7 @@ public class FieldTermStack {
    */
   public FieldTermStack( IndexReader reader, int docId, String fieldName, final FieldQuery
fieldQuery ) throws IOException {
     this.fieldName = fieldName;
-
+    
     TermFreqVector tfv = reader.getTermFreqVector( docId, fieldName );
     if( tfv == null ) return; // just return to make null snippets
     TermPositionVector tpv = null;

Modified: lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
Mon Aug 15 17:11:29 2011
@@ -25,7 +25,7 @@ This is an another highlighter implement
 <li>support N-gram fields</li>
 <li>support phrase-unit highlighting with slops</li>
 <li>need Java 1.5</li>
-<li>highlight fields need to be TermVector.WITH_POSITIONS_OFFSETS</li>
+<li>highlight fields need to be stored with term vector positions and offsets</li>
 <li>take into account query boost to score fragments</li>
 <li>support colored highlight tags</li>
 <li>pluggable FragListBuilder</li>
@@ -95,7 +95,7 @@ will be generated:</p>
 
 <h3>Step 2.</h3>
 <p>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 with term vector positions and offsets)
 to generate it. <code>FieldTermStack</code> keeps the terms in the user query.
 Therefore, in this sample case, Fast Vector Highlighter generates the following <code>FieldTermStack</code>:</p>
 <pre>

Modified: lucene/dev/branches/fieldtype/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
Mon Aug 15 17:11:29 2011
@@ -240,11 +240,8 @@ public class MemoryIndex {
   /**
    * Convenience method; Tokenizes the given field text and adds the resulting
    * terms to the index; Equivalent to adding an indexed non-keyword Lucene
-   * {@link org.apache.lucene.document.Field} that is
-   * {@link org.apache.lucene.document.Field.Index#ANALYZED tokenized},
-   * {@link org.apache.lucene.document.Field.Store#NO not stored},
-   * {@link org.apache.lucene.document.Field.TermVector#WITH_POSITIONS termVectorStored with
positions} (or
-   * {@link org.apache.lucene.document.Field.TermVector#WITH_POSITIONS termVectorStored with
positions and offsets}),
+   * {@link org.apache.lucene.document.Field} that is tokenized, not stored,
+   * termVectorStored with positions (or termVectorStored with positions and offsets),
    * 
    * @param fieldName
    *            a name to be associated with the text

Modified: lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorResult.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorResult.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorResult.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorResult.java
Mon Aug 15 17:11:29 2011
@@ -20,39 +20,41 @@ package org.apache.lucene.document;
  *  Provides information about what should be done with this Field 
  *
  **/
+import org.apache.lucene.index.IndexableField; // for javadocs
+
 public enum FieldSelectorResult {
 
     /**
      * Load this {@link Field} every time the {@link Document} is loaded, reading in the
data as it is encountered.
-     *  {@link Document#getField(String)} and {@link Document#getFieldable(String)} should
not return null.
+     *  {@link Document#getField(String)} should not return null.
      *<p/>
-     * {@link Document#add(Fieldable)} should be called by the Reader.
+     * {@link Document#add(IndexableField)} should be called by the Reader.
      */
   LOAD,
 
     /**
      * Lazily load this {@link Field}.  This means the {@link Field} is valid, but it may
not actually contain its data until
-     * invoked.  {@link Document#getField(String)} SHOULD NOT BE USED.  {@link Document#getFieldable(String)}
is safe to use and should
-     * return a valid instance of a {@link Fieldable}.
+     * invoked.  {@link Document#getField(String)} is safe to use and should
+     * return a valid instance of a {@link IndexableField}.
      *<p/>
-     * {@link Document#add(Fieldable)} should be called by the Reader.
+     * {@link Document#add(IndexableField)} should be called by the Reader.
      */
   LAZY_LOAD,
 
     /**
-     * Do not load the {@link Field}.  {@link Document#getField(String)} and {@link Document#getFieldable(String)}
should return null.
-     * {@link Document#add(Fieldable)} is not called.
+     * Do not load the {@link Field}.  {@link Document#getField(String)} should return null.
+     * {@link Document#add(IndexableField)} is not called.
      * <p/>
-     * {@link Document#add(Fieldable)} should not be called by the Reader.
+     * {@link Document#add(IndexableField)} should not be called by the Reader.
      */
   NO_LOAD,
 
     /**
      * Load this field as in the {@link #LOAD} case, but immediately return from {@link Field}
loading for the {@link Document}.  Thus, the
-     * Document may not have its complete set of Fields.  {@link Document#getField(String)}
and {@link Document#getFieldable(String)} should
+     * Document may not have its complete set of Fields.  {@link Document#getField(String)}
should
      * both be valid for this {@link Field}
      * <p/>
-     * {@link Document#add(Fieldable)} should be called by the Reader.
+     * {@link Document#add(IndexableField)} should be called by the Reader.
      */
   LOAD_AND_BREAK,
 
@@ -67,10 +69,10 @@ public enum FieldSelectorResult {
 
   /**
      * Lazily load this {@link Field}, but do not cache the result.  This means the {@link
Field} is valid, but it may not actually contain its data until
-     * invoked.  {@link Document#getField(String)} SHOULD NOT BE USED.  {@link Document#getFieldable(String)}
is safe to use and should
-     * return a valid instance of a {@link Fieldable}.
+     * invoked.  {@link Document#getField(String)} is safe to use and should
+     * return a valid instance of a {@link IndexableField}.
      *<p/>
-     * {@link Document#add(Fieldable)} should be called by the Reader.
+     * {@link Document#add(IndexableField)} should be called by the Reader.
      */
   LATENT
 }

Modified: lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
Mon Aug 15 17:11:29 2011
@@ -36,7 +36,7 @@ import org.apache.lucene.util.ReaderUtil
  * 
  * If Similarity class is specified, uses its computeNorm method to set norms.
  * If -n command line argument is used, removed field norms, as if 
- * {@link org.apache.lucene.document.Field.Index}.NO_NORMS was used.
+ * {@link org.apache.lucene.document.FieldType#setOmitNorms(boolean)} was used.
  *
  * <p>
  * NOTE: This will overwrite any length normalization or field/document boosts.

Modified: lucene/dev/branches/fieldtype/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
Mon Aug 15 17:11:29 2011
@@ -152,10 +152,10 @@ public class TestContribIndexReader exte
     lazyFields.add("bin1");
     FieldSelector sel = new SetBasedFieldSelector(new HashSet<String>(), lazyFields);
     doc2 = getDocument(reader, reader.maxDoc() - 1, sel);
-    IndexableField[] fieldables = doc2.getFields("bin1");
-    assertNotNull(fieldables);
-    assertEquals(1, fieldables.length);
-    IndexableField fb1 = fieldables[0];
+    fields = doc2.getFields("bin1");
+    assertNotNull(fields);
+    assertEquals(1, fields.length);
+    IndexableField fb1 = fields[0];
     assertTrue(fb1.binaryValue(null)!=null);
     bytesRef = fb1.binaryValue(null);
     assertEquals(bin.length, bytesRef.bytes.length);

Modified: lucene/dev/branches/fieldtype/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/Syns2Index.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/Syns2Index.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/Syns2Index.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/Syns2Index.java
Mon Aug 15 17:11:29 2011
@@ -56,7 +56,6 @@ import org.apache.lucene.util.Version;
  * "word" field, and if present there will be fields named "syn"
  * for every synonym. What's tricky here is that there could be <b>multiple</b>
  * fields with the same name, in the general case for words that have multiple synonyms.
- * That's not a problem with Lucene, you just use {@link org.apache.lucene.document.Document#getValues}
  * </p>
  * <p>
  * While the WordNet file distinguishes groups of synonyms with

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/analysis/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/analysis/package.html?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/analysis/package.html
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/analysis/package.html
Mon Aug 15 17:11:29 2011
@@ -172,7 +172,7 @@ the source code of any one of the many s
 </p>
 <h3>Field Section Boundaries</h3>
 <p>
-  When {@link org.apache.lucene.document.Document#add(org.apache.lucene.document.Fieldable)
document.add(field)}
+  When {@link org.apache.lucene.document.Document#add(org.apache.lucene.index.IndexableField)
document.add(field)}
   is called multiple times for the same field name, we could say that each such call creates
a new 
   section for that field in that document. 
   In fact, a separate call to 

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/Field.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/Field.java Mon
Aug 15 17:11:29 2011
@@ -241,11 +241,7 @@ public class Field implements IndexableF
    * into the score of all hits on this this field of this document.
    * 
    * <p>
-   * The boost is multiplied by
-   * {@link org.apache.lucene.document.Document#getBoost()} of the document
-   * containing this field. If a document has multiple fields with the same
-   * name, all such values are multiplied together. This product is then used to
-   * compute the norm factor for the field. By default, in the
+   * Boost is used to compute the norm factor for the field. By default, in the
    * {@link org.apache.lucene.search.Similarity#computeNorm(FieldInvertState)}
    * method, the boost value is multiplied by the length normalization factor
    * and then rounded by
@@ -253,7 +249,6 @@ public class Field implements IndexableF
    * it is stored in the index. One should attempt to ensure that this product
    * does not overflow the range of that encoding.
    * 
-   * @see org.apache.lucene.document.Document#setBoost(float)
    * @see org.apache.lucene.search.Similarity#computeNorm(FieldInvertState)
    * @see org.apache.lucene.search.Similarity#encodeNormValue(float)
    */

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/package.html?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/package.html
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/document/package.html
Mon Aug 15 17:11:29 2011
@@ -0,0 +1,56 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body>
+<p>The logical representation of a {@link org.apache.lucene.document.Document} for
indexing and searching.</p>
+<p>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.</p>
+<h2>Document and Fieldable</h2>
+<p>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}
+  for specifics on these properties.
+</p>
+<p>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.</p>
+<h2>Working with Documents</h2>
+<p>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.)
+  How this is done is completely up to you.  That being said, there are many tools available
in other projects that can make
+  the process of taking a file and converting it into a Lucene {@link org.apache.lucene.document.Document}.
 To see an example of this,
+  take a look at the Lucene <a href="../../../../../../gettingstarted.html" target="top">demo</a>
and the associated source code
+  for extracting content from HTML.
+</p>
+<p>The {@link org.apache.lucene.document.DateTools} is a utility class to make dates
and times searchable
+(remember, Lucene only searches text). {@link org.apache.lucene.document.NumericField} is
a special helper class
+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).</p>
+<p>The {@link org.apache.lucene.index.StoredFieldVisitor} class provides a mechanism
to customize how the stored fields values are processed.
+If no StoredFieldVisitor is used, all Fields are loaded into a returned Document.  As an
example of the StoredFieldVisitor 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 StoredFieldVisitor,
+the full Document had to be loaded, including the large fields, in order to display the results.
 Now, using the StoredFieldVisitor, one
+can choose which fields should be loaded and how their values should be recorded.  If you
simply want to load only certain fields, consider using
+{@link org.apache.lucene.index.DocumentStoredFieldVisitor}.
+</body>
+</html>

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/CheckIndex.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/CheckIndex.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/CheckIndex.java
Mon Aug 15 17:11:29 2011
@@ -17,6 +17,7 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
+import org.apache.lucene.document.FieldType; // for javadocs
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TermQuery;
@@ -175,7 +176,7 @@ public class CheckIndex {
 
       /** True if at least one of the fields in this segment
        *  does not omitTermFreqAndPositions.
-       *  @see AbstractField#setOmitTermFreqAndPositions */
+       *  @see FieldType#setOmitTermFreqAndPositions */
       public boolean hasProx;
 
       /** Map that includes certain

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/FieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/FieldInfos.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/FieldInfos.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/FieldInfos.java
Mon Aug 15 17:11:29 2011
@@ -37,8 +37,8 @@ import org.apache.lucene.store.IndexOutp
 import org.apache.lucene.util.CodecUtil;
 import org.apache.lucene.util.StringHelper;
 
-/** Access to the Fieldable Info file that describes document fields and whether or
- *  not they are indexed. Each segment has a separate Fieldable Info file. Objects
+/** Access to the Field Info file that describes document fields and whether or
+ *  not they are indexed. Each segment has a separate Field Info file. Objects
  *  of this class are thread-safe for multiple readers, but only one thread can
  *  be adding documents at a time, with no other reader or writer threads
  *  accessing this object.
@@ -359,7 +359,7 @@ public final class FieldInfos implements
   /**
    * Calls 5 parameter add with false for all TermVector parameters.
    * 
-   * @param name The name of the Fieldable
+   * @param name The name of the IndexableField
    * @param isIndexed true if the field is indexed
    * @see #addOrUpdate(String, boolean, boolean, boolean, boolean)
    */

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/IndexReader.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/IndexReader.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/IndexReader.java
Mon Aug 15 17:11:29 2011
@@ -861,7 +861,6 @@ public abstract class IndexReader implem
    * @return array of term frequency vectors. May be null if no term vectors have been
    *  stored for the specified document.
    * @throws IOException if index cannot be accessed
-   * @see org.apache.lucene.document.Field.TermVector
    */
   abstract public TermFreqVector[] getTermFreqVectors(int docNumber)
           throws IOException;
@@ -879,7 +878,6 @@ public abstract class IndexReader implem
    * @return term frequency vector May be null if field does not exist in the specified
    * document or term vector was not stored.
    * @throws IOException if index cannot be accessed
-   * @see org.apache.lucene.document.Field.TermVector
    */
   abstract public TermFreqVector getTermFreqVector(int docNumber, String field)
           throws IOException;

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/TermFreqVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/TermFreqVector.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/TermFreqVector.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/index/TermFreqVector.java
Mon Aug 15 17:11:29 2011
@@ -26,7 +26,7 @@ import org.apache.lucene.util.BytesRef;
  */
 public interface TermFreqVector {
   /**
-   * The {@link org.apache.lucene.document.Fieldable} name. 
+   * The {@link org.apache.lucene.index.IndexableField} name. 
    * @return The name of the field this vector is associated with.
    * 
    */ 

Modified: lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/search/Similarity.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/search/Similarity.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/java/org/apache/lucene/search/Similarity.java
Mon Aug 15 17:11:29 2011
@@ -453,12 +453,8 @@ import org.apache.lucene.util.SmallFloat
  *      <b><i>norm(t,d)</i></b> encapsulates a few (indexing time)
boost and length factors:
  *
  *      <ul>
- *        <li><b>Document boost</b> - set by calling
- *        {@link org.apache.lucene.document.Document#setBoost(float) doc.setBoost()}
- *        before adding the document to the index.
- *        </li>
  *        <li><b>Field boost</b> - set by calling
- *        {@link org.apache.lucene.document.Fieldable#setBoost(float) field.setBoost()}
+ *        {@link org.apache.lucene.document.Field#setBoost(float) field.setBoost()}
  *        before adding the field to a document.
  *        </li>
  *        <li><b>lengthNorm</b> - computed
@@ -478,9 +474,6 @@ import org.apache.lucene.util.SmallFloat
  *      <table cellpadding="1" cellspacing="0" border="0"n align="center">
  *        <tr>
  *          <td valign="middle" align="right" rowspan="1">
- *            norm(t,d) &nbsp; = &nbsp;
- *            {@link org.apache.lucene.document.Document#getBoost() doc.getBoost()}
- *            &nbsp;&middot;&nbsp;
  *            lengthNorm
  *            &nbsp;&middot;&nbsp;
  *          </td>
@@ -488,7 +481,7 @@ import org.apache.lucene.util.SmallFloat
  *            <big><big><big>&prod;</big></big></big>
  *          </td>
  *          <td valign="middle" align="right" rowspan="1">
- *            {@link org.apache.lucene.document.Fieldable#getBoost() f.getBoost}()
+ *            {@link org.apache.lucene.index.IndexableField#boost() f.getBoost}()
  *          </td>
  *        </tr>
  *        <tr valigh="top">

Modified: lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestIndexReader.java?rev=1157913&r1=1157912&r2=1157913&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
Mon Aug 15 17:11:29 2011
@@ -929,11 +929,11 @@ public class TestIndexReader extends Luc
         if (delDocs1 == null || !delDocs1.get(i)) {
           Document doc1 = index1.document(i);
           Document doc2 = index2.document(i);
-          List<IndexableField> fieldable1 = doc1.getFields();
-          List<IndexableField> fieldable2 = doc2.getFields();
-          assertEquals("Different numbers of fields for doc " + i + ".", fieldable1.size(),
fieldable2.size());
-          Iterator<IndexableField> itField1 = fieldable1.iterator();
-          Iterator<IndexableField> itField2 = fieldable2.iterator();
+          List<IndexableField> field1 = doc1.getFields();
+          List<IndexableField> field2 = doc2.getFields();
+          assertEquals("Different numbers of fields for doc " + i + ".", field1.size(), field2.size());
+          Iterator<IndexableField> itField1 = field1.iterator();
+          Iterator<IndexableField> itField2 = field2.iterator();
           while (itField1.hasNext()) {
             Field curField1 = (Field) itField1.next();
             Field curField2 = (Field) itField2.next();



Mime
View raw message