lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1166536 - in /lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard: builders/RangeQueryNodeBuilder.java nodes/AbstractRangeQueryNode.java
Date Thu, 08 Sep 2011 06:32:28 GMT
Author: uschindler
Date: Thu Sep  8 06:32:28 2011
New Revision: 1166536

URL: http://svn.apache.org/viewvc?rev=1166536&view=rev
Log:
LUCENE-1768: Some final minor changes (deprecations and better check)

Modified:
    lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
    lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/AbstractRangeQueryNode.java

Modified: lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java?rev=1166536&r1=1166535&r2=1166536&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
Thu Sep  8 06:32:28 2011
@@ -28,7 +28,10 @@ import org.apache.lucene.search.TermRang
 
 /**
  * Builds a {@link TermRangeQuery} object from a {@link RangeQueryNode} object.
+ * 
+ * @deprecated this builder will be removed in future together with {@link RangeQueryNode}
  */
+@Deprecated
 public class RangeQueryNodeBuilder implements StandardQueryBuilder {
 
   public RangeQueryNodeBuilder() {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/AbstractRangeQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/AbstractRangeQueryNode.java?rev=1166536&r1=1166535&r2=1166536&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/AbstractRangeQueryNode.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/AbstractRangeQueryNode.java
Thu Sep  8 06:32:28 2011
@@ -148,8 +148,9 @@ public abstract class AbstractRangeQuery
       String lowerField = StringUtils.toString(lower.getField());
       String upperField = StringUtils.toString(upper.getField());
       
-      if ((upperField == null && lowerField == null)
-          || (upperField != null && !upperField.equals(lowerField))) {
+      if ((upperField != null || lowerField != null)
+          && ((upperField != null && !upperField.equals(lowerField)) || !lowerField
+              .equals(upperField))) {
         throw new IllegalArgumentException(
             "lower and upper bounds should have the same field name!");
       }



Mime
View raw message