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 dn...@apache.org on 2005/07/15 23:03:34 UTC

svn commit: r219250 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/BooleanQuery.java

Author: dnaber
Date: Fri Jul 15 14:03:33 2005
New Revision: 219250

URL: http://svn.apache.org/viewcvs?rev=219250&view=rev
Log:
maxClauseCount: deprecate public field, no more setting via system property

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?rev=219250&r1=219249&r2=219250&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Fri Jul 15 14:03:33 2005
@@ -45,11 +45,14 @@
  7. Several default values cannot be set via system properties anymore, as
     this has been considered inappropriate for a library like Lucene. For
     most properties there are set/get methods available in IndexWriter which
-    you should use instead.
-    This affects the following properties: org.apache.lucene.writeLockTimeout,
-    org.apache.lucene.commitLockTimeout, org.apache.lucene.minMergeDocs, 
-    org.apache.lucene.maxMergeDocs, org.apache.lucene.maxFieldLength, 
-    org.apache.lucene.termIndexInterval, org.apache.lucene.mergeFactor
+    you should use instead. This affects the following properties:
+    See IndexWriter for getter/setter methods:
+      org.apache.lucene.writeLockTimeout, org.apache.lucene.commitLockTimeout,
+      org.apache.lucene.minMergeDocs, org.apache.lucene.maxMergeDocs,
+      org.apache.lucene.maxFieldLength, org.apache.lucene.termIndexInterval,
+      org.apache.lucene.mergeFactor,
+    See BooleanQuery for getter/setter methods:
+      org.apache.lucene.maxClauseCount
     (Daniel Naber)
  
 New features

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java?rev=219250&r1=219249&r2=219250&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java Fri Jul 15 14:03:33 2005
@@ -29,23 +29,10 @@
   */
 public class BooleanQuery extends Query {
   
-  /** The maximum number of clauses permitted. Default value is 1024.
-   * Use the <code>org.apache.lucene.maxClauseCount</code> system property
-   * to override.
-   * <p>TermQuery clauses are generated from for example prefix queries and
-   * fuzzy queries. Each TermQuery needs some buffer space during search,
-   * so this parameter indirectly controls the maximum buffer requirements for
-   * query search.
-   * <p>When this parameter becomes a bottleneck for a Query one can use a
-   * Filter. For example instead of a {@link RangeQuery} one can use a
-   * {@link RangeFilter}.
-   * <p>Normally the buffers are allocated by the JVM. When using for example
-   * {@link org.apache.lucene.store.MMapDirectory} the buffering is left to
-   * the operating system.
+  /**
+   * @deprecated use {@link #setMaxClauseCount(int)} instead
    */
-  public static int maxClauseCount =
-    Integer.parseInt(System.getProperty("org.apache.lucene.maxClauseCount",
-      "1024"));
+  public static int maxClauseCount = 1024;
 
   /** Thrown when an attempt is made to add more than {@link
    * #getMaxClauseCount()} clauses. This typically happens if
@@ -57,11 +44,23 @@
   /** Return the maximum number of clauses permitted, 1024 by default.
    * Attempts to add more than the permitted number of clauses cause {@link
    * TooManyClauses} to be thrown.
-   * @see #maxClauseCount
+   * @see #setMaxClauseCount(int)
    */
   public static int getMaxClauseCount() { return maxClauseCount; }
 
-  /** Set the maximum number of clauses permitted. */
+  /** Set the maximum number of clauses permitted per BooleanQuery.
+   * Default value is 1024.
+   * <p>TermQuery clauses are generated from for example prefix queries and
+   * fuzzy queries. Each TermQuery needs some buffer space during search,
+   * so this parameter indirectly controls the maximum buffer requirements for
+   * query search.
+   * <p>When this parameter becomes a bottleneck for a Query one can use a
+   * Filter. For example instead of a {@link RangeQuery} one can use a
+   * {@link RangeFilter}.
+   * <p>Normally the buffers are allocated by the JVM. When using for example
+   * {@link org.apache.lucene.store.MMapDirectory} the buffering is left to
+   * the operating system.
+   */
   public static void setMaxClauseCount(int maxClauseCount) {
     BooleanQuery.maxClauseCount = maxClauseCount;
   }