Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-5365, LUCENE-7818: Fix incorrect condition in queryparser's QueryNodeOperation#logicalAnd()

Uwe Schindler0ed39b2774c1
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index e9aefe59505..54cc54a2891 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -114,9 +114,13 @@ Bug Fixes
* LUCENE-7798: Add .equals and .hashCode to ToParentBlockJoinSortField
(Mikhail Khludnev)
-* LUCENE-7814: DateRangePrefixTree (in spatial-extras ) had edge-case bugs for
+* LUCENE-7814: DateRangePrefixTree (in spatial-extras) had edge-case bugs for
years >= 292,000,000. (David Smiley)
+* LUCENE-5365, LUCENE-7818: Fix incorrect condition in queryparser's
+ QueryNodeOperation#logicalAnd(). (Olivier Binda, Amrit Sarkar,
+ AppChecker via Uwe Schindler)
+
Improvements
* LUCENE-7782: OfflineSorter now passes the total number of items it
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java
index 4280d1c21df..7d82510625b 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java
@@ -56,7 +56,7 @@ public final class QueryNodeOperation {
op = ANDOperation.BOTH;
else if (q1 instanceof AndQueryNode)
op = ANDOperation.Q1;
- else if (q1 instanceof AndQueryNode)
+ else if (q2 instanceof AndQueryNode)
op = ANDOperation.Q2;
else
op = ANDOperation.NONE;