lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r546694 - in /lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index: TermFreqVector.java TermVectorOffsetInfo.java
Date Wed, 13 Jun 2007 01:09:36 GMT
Author: gsingers
Date: Tue Jun 12 18:09:35 2007
New Revision: 546694

URL: http://svn.apache.org/viewvc?view=rev&rev=546694
Log:
LUCENE 918 and 922 docs for term vectors

Modified:
    lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermFreqVector.java
    lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java

Modified: lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermFreqVector.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermFreqVector.java?view=diff&rev=546694&r1=546693&r2=546694
==============================================================================
--- lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermFreqVector.java (original)
+++ lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermFreqVector.java Tue
Jun 12 18:09:35 2007
@@ -18,12 +18,14 @@
  */
 
 /** Provides access to stored term vector of 
- *  a document field.
+ *  a document field.  The vector consists of the name of the field, an array of the terms
tha occur in the field of the
+ * {@link org.apache.lucene.document.Document} and a parallel array of frequencies.  Thus,
getTermFrequencies()[5] corresponds with the
+ * frequency of getTerms()[5], assuming there are at least 5 terms in the Document.
  */
 public interface TermFreqVector {
   /**
-   * 
-   * @return The field this vector is associated with.
+   * The {@link org.apache.lucene.document.Fieldable} name. 
+   * @return The name of the field this vector is associated with.
    * 
    */ 
   public String getField();

Modified: lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java?view=diff&rev=546694&r1=546693&r2=546694
==============================================================================
--- lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
(original)
+++ lucene/java/branches/lucene_2_2/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
Tue Jun 12 18:09:35 2007
@@ -17,10 +17,18 @@
  * limitations under the License.
  */
 
+/**
+ * The TermVectorOffsetInfo class holds information pertaining to a Term in a {@link org.apache.lucene.index.TermPositionVector}'s
+ * offset information.  This offset information is the character offset as set during the
Analysis phase (and thus may not be the actual offset in the
+ * original content).
+ */
 public class TermVectorOffsetInfo {
-    public static final TermVectorOffsetInfo [] EMPTY_OFFSET_INFO = new TermVectorOffsetInfo[0];
-    private int startOffset;
-    private int endOffset;
+  /**
+   * Convenience declaration when creating a {@link org.apache.lucene.index.TermPositionVector}
that stores only position information.
+   */
+  public static final TermVectorOffsetInfo[] EMPTY_OFFSET_INFO = new TermVectorOffsetInfo[0];
+  private int startOffset;
+  private int endOffset;
 
   public TermVectorOffsetInfo() {
   }
@@ -30,6 +38,10 @@
     this.startOffset = startOffset;
   }
 
+  /**
+   * The accessor for the ending offset for the term
+   * @return The offset
+   */
   public int getEndOffset() {
     return endOffset;
   }
@@ -38,6 +50,11 @@
     this.endOffset = endOffset;
   }
 
+  /**
+   * The accessor for the starting offset of the term.
+   *
+   * @return The offset
+   */
   public int getStartOffset() {
     return startOffset;
   }
@@ -46,6 +63,11 @@
     this.startOffset = startOffset;
   }
 
+  /**
+   * Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
+   * @param o The comparison Object
+   * @return true if both {@link #getStartOffset()} and {@link #getEndOffset()} are the same
for both objects.
+   */
   public boolean equals(Object o) {
     if (this == o) return true;
     if (!(o instanceof TermVectorOffsetInfo)) return false;



Mime
View raw message