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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]