You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/11/05 20:11:55 UTC

[GitHub] [lucene-solr] thomaswoeckinger commented on a change in pull request #2605: SOLR-15762: Detect invalid filter cache configuration during join

thomaswoeckinger commented on a change in pull request #2605:
URL: https://github.com/apache/lucene-solr/pull/2605#discussion_r743937533



##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used in whole block, so it would introduce null checks

##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used in during whole block, so it would introduce null checks

##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used during the whole block, so it would introduce null checks

##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used in whole block, so it would introduce null checks

##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used in during whole block, so it would introduce null checks

##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -587,17 +587,27 @@ public DocSet getDocSetEnumerate() throws IOException {
             // if we don't have a bitset yet, or if the resulting set will be too large
             // use the filterCache to get a DocSet
             if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) {
-              // use filter cache
-              DocSet toTermSet = toSearcher.getDocSet(toDeState);
-              resultListDocs += toTermSet.size();
-              if (resultBits != null) {
-                toTermSet.addAllTo(new BitDocSet(resultBits));
-              } else {
-                if (toTermSet instanceof BitDocSet) {
-                  resultBits = ((BitDocSet)toTermSet).bits.clone();
+              try {
+                // use filter cache
+                DocSet toTermSet = toSearcher.getDocSet(toDeState);

Review comment:
       toTermSet is used during the whole block, so it would introduce null checks




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org