lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r763354 - in /lucene/java/trunk/src/java/org/apache/lucene: document/AbstractField.java document/Fieldable.java index/CheckIndex.java index/DocFieldProcessorPerThread.java
Date Wed, 08 Apr 2009 19:17:57 GMT
Author: mikemccand
Date: Wed Apr  8 19:17:56 2009
New Revision: 763354

URL: http://svn.apache.org/viewvc?rev=763354&view=rev
Log:
LUCENE-1561: don't change Fieldable interface for the rename; add deprecated to AbstractField's
omitTf methods

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java
    lucene/java/trunk/src/java/org/apache/lucene/document/Fieldable.java
    lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java?rev=763354&r1=763353&r2=763354&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java Wed Apr  8 19:17:56
2009
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+import org.apache.lucene.search.PhraseQuery; // for javadocs
+import org.apache.lucene.search.spans.SpanQuery; // for javadocs
+
 
 /**
  *
@@ -263,8 +266,10 @@
   /** True if norms are omitted for this indexed field */
   public boolean getOmitNorms() { return omitNorms; }
 
+  /** @deprecated Renamed to {@link #getOmitTermFreqAndPositions} */
   public boolean getOmitTf() { return omitTermFreqAndPositions; }
 
+  /** @see #setOmitTermFreqAndPositions */
   public boolean getOmitTermFreqAndPositions() { return omitTermFreqAndPositions; }
   
   /** Expert:
@@ -274,8 +279,20 @@
    */
   public void setOmitNorms(boolean omitNorms) { this.omitNorms=omitNorms; }
 
+  /** @deprecated Renamed to {@link #setOmitTermFreqAndPositions} */
   public void setOmitTf(boolean omitTermFreqAndPositions) { this.omitTermFreqAndPositions=omitTermFreqAndPositions;
}
 
+  /** Expert:
+   *
+   * If set, omit term freq, positions and payloads from
+   * postings for this field.
+   *
+   * <p><b>NOTE</b>: While this option reduces storage space
+   * required in the index, it also means any query
+   * requiring positional information, such as {@link
+   * PhraseQuery} or {@link SpanQuery} subclasses will
+   * silently fail to find results.
+   */
   public void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions) { this.omitTermFreqAndPositions=omitTermFreqAndPositions;
}
  
   public boolean isLazy() {

Modified: lucene/java/trunk/src/java/org/apache/lucene/document/Fieldable.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/Fieldable.java?rev=763354&r1=763353&r2=763354&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/Fieldable.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/Fieldable.java Wed Apr  8 19:17:56
2009
@@ -17,9 +17,7 @@
  */
 
 import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.index.FieldInvertState;
-import org.apache.lucene.search.PhraseQuery;      // for javadocs
-import org.apache.lucene.search.spans.SpanQuery;  // for javadocs
+import org.apache.lucene.index.FieldInvertState; // for javadocs
 
 import java.io.Reader;
 import java.io.Serializable;
@@ -147,27 +145,12 @@
    */
   void setOmitNorms(boolean omitNorms);
 
-  /** @deprecated Renamed to {@link #setOmitTermFreqAndPositions} */
+  /** @deprecated Renamed to {@link AbstractField#setOmitTermFreqAndPositions} */
   void setOmitTf(boolean omitTf);
 
-  /** @deprecated Renamed to {@link #getOmitTermFreqAndPositions} */
+  /** @deprecated Renamed to {@link AbstractField#getOmitTermFreqAndPositions} */
   boolean getOmitTf();
 
-  /** Expert:
-   *
-   * If set, omit term freq, positions and payloads from postings for this field.
-   * <p><b>NOTE</b>: this is a dangerous option to enable.
-   * While it reduces storage space required in the index,
-   * it also means any query requiring positional
-   * infromation, such as {@link PhraseQuery} or {@link
-   * SpanQuery} subclasses will silently fail to find
-   * results.
-   */
-  void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions);
-
-  /** True if tf is omitted for this indexed field */
-  boolean getOmitTermFreqAndPositions();
-
   /**
    * Indicates whether a Field is Lazy or not.  The semantics of Lazy loading are such that
if a Field is lazily loaded, retrieving
    * it's values via {@link #stringValue()} or {@link #binaryValue()} is only valid as long
as the {@link org.apache.lucene.index.IndexReader} that

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java?rev=763354&r1=763353&r2=763354&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java Wed Apr  8 19:17:56
2009
@@ -20,6 +20,7 @@
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.document.AbstractField;  // for javadocs
 import org.apache.lucene.document.Document;
 
 import java.text.NumberFormat;
@@ -29,7 +30,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.ArrayList;
-import org.apache.lucene.document.Fieldable;          // for javadoc
 
 /**
  * Basic tool and API to check the health of an index and
@@ -167,7 +167,7 @@
 
       /** True if at least one of the fields in this segment
        *  does not omitTermFreqAndPositions.
-       *  @see Fieldable#setOmitTermFreqAndPositions */
+       *  @see AbstractField#setOmitTermFreqAndPositions */
       public boolean hasProx;
     }
   }

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java?rev=763354&r1=763353&r2=763354&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java Wed
Apr  8 19:17:56 2009
@@ -183,7 +183,7 @@
         // easily add it
         FieldInfo fi = fieldInfos.add(fieldName, field.isIndexed(), field.isTermVectorStored(),
                                       field.isStorePositionWithTermVector(), field.isStoreOffsetWithTermVector(),
-                                      field.getOmitNorms(), false, field.getOmitTermFreqAndPositions());
+                                      field.getOmitNorms(), false, field.getOmitTf());
 
         fp = new DocFieldProcessorPerField(this, fi);
         fp.next = fieldHash[hashPos];
@@ -195,7 +195,7 @@
       } else
         fp.fieldInfo.update(field.isIndexed(), field.isTermVectorStored(),
                             field.isStorePositionWithTermVector(), field.isStoreOffsetWithTermVector(),
-                            field.getOmitNorms(), false, field.getOmitTermFreqAndPositions());
+                            field.getOmitNorms(), false, field.getOmitTf());
 
       if (thisFieldGen != fp.lastGen) {
 



Mime
View raw message