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/05/11 01:57:15 UTC

[GitHub] [lucene] zacharymorn commented on a change in pull request #113: LUCENE-9335: [Discussion Only] Implement BMM with BulkScorer interface

zacharymorn commented on a change in pull request #113:
URL: https://github.com/apache/lucene/pull/113#discussion_r629794667



##########
File path: lucene/core/src/java/org/apache/lucene/search/BMMBulkScorer.java
##########
@@ -0,0 +1,317 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search;
+
+import static org.apache.lucene.search.ScorerUtil.costWithMinShouldMatch;
+
+import java.io.IOException;
+import java.util.*;
+import org.apache.lucene.util.Bits;
+
+/** BulkScorer that leverages BMM algorithm within interval (min, max) */
+public class BMMBulkScorer extends BulkScorer {
+  private List<Scorer> scorers;
+  private DisiWrapper[] allScorers;
+  private Weight weight;
+  private ScoreMode scoreMode;
+  private int scalingFactor;
+  private long cost;
+  private static final int FIXED_WINDOW_SIZE = 2048;

Review comment:
       Hmm I thought we would like to use a window here so that we only need to update maxScore for scorers at larger interval checkpoint (the other implementation has more frequent checks and updates for maxScore, as it takes the min of block boundary of all scorers). But anyway by taking out the window here I assume you would like to have the BMM scorer run directly through BulkScorer? I can give that a try as well!




-- 
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.

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