You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by ma...@apache.org on 2009/08/02 19:59:22 UTC

svn commit: r800119 - in /lucene/java/trunk/src/java/org/apache/lucene/search: SortComparator.java SortComparatorSource.java

Author: markrmiller
Date: Sun Aug  2 17:59:21 2009
New Revision: 800119

URL: http://svn.apache.org/viewvc?rev=800119&view=rev
Log:
LUCENE-1764: beef up javadoc with warning

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/SortComparator.java
    lucene/java/trunk/src/java/org/apache/lucene/search/SortComparatorSource.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/SortComparator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/SortComparator.java?rev=800119&r1=800118&r2=800119&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/SortComparator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/SortComparator.java Sun Aug  2 17:59:21 2009
@@ -23,21 +23,29 @@
 
 /**
  * Abstract base class for sorting hits returned by a Query.
- *
- * <p>This class should only be used if the other SortField
- * types (SCORE, DOC, STRING, INT, FLOAT) do not provide an
- * adequate sorting.  It maintains an internal cache of values which
- * could be quite large.  The cache is an array of Comparable,
- * one for each document in the index.  There is a distinct
- * Comparable for each unique term in the field - if
- * some documents have the same term in the field, the cache
- * array will have entries which reference the same Comparable.
- *
- * <p>Created: Apr 21, 2004 5:08:38 PM
- *
- *
+ * 
+ * <p>
+ * This class should only be used if the other SortField types (SCORE, DOC,
+ * STRING, INT, FLOAT) do not provide an adequate sorting. It maintains an
+ * internal cache of values which could be quite large. The cache is an array of
+ * Comparable, one for each document in the index. There is a distinct
+ * Comparable for each unique term in the field - if some documents have the
+ * same term in the field, the cache array will have entries which reference the
+ * same Comparable.
+ * 
+ * This class will be used as part of a key to a FieldCache value. You must
+ * implement hashCode and equals to avoid an explosion in RAM usage if you use
+ * instances that are not the same instance. If you are searching using the
+ * Remote contrib, the same instance of this class on the client will be a new
+ * instance on every call to the server, so hashCode/equals is very important in
+ * that situation.
+ * 
+ * <p>
+ * Created: Apr 21, 2004 5:08:38 PM
+ * 
+ * 
  * @version $Id$
- * @since   1.4
+ * @since 1.4
  * @deprecated Please use {@link FieldComparatorSource} instead.
  */
 public abstract class SortComparator

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/SortComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/SortComparatorSource.java?rev=800119&r1=800118&r2=800119&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/SortComparatorSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/SortComparatorSource.java Sun Aug  2 17:59:21 2009
@@ -23,12 +23,20 @@
 
 /**
  * Expert: returns a comparator for sorting ScoreDocs.
- *
- * <p>Created: Apr 21, 2004 3:49:28 PM
  * 
- *
- * @version $Id$
- * @since   1.4
+ * <p>
+ * Created: Apr 21, 2004 3:49:28 PM
+ * 
+ * This class will be used as part of a key to a FieldCache value. You must
+ * implement hashCode and equals to avoid an explosion in RAM usage if you use
+ * instances that are not the same instance. If you are searching using the
+ * Remote contrib, the same instance of this class on the client will be a new
+ * instance on every call to the server, so hashCode/equals is very important in
+ * that situation.
+ * 
+ * @version $Id: SortComparatorSource.java 747019 2009-02-23 13:59:50Z
+ *          mikemccand $
+ * @since 1.4
  * @deprecated Please use {@link FieldComparatorSource} instead.
  */
 public interface SortComparatorSource