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/03/31 11:00:29 UTC

[GitHub] [lucene] iverase commented on a change in pull request #7: LUCENE-9820: Separate logic for reading the BKD index from logic to intersecting it

iverase commented on a change in pull request #7:
URL: https://github.com/apache/lucene/pull/7#discussion_r604799373



##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDIndexInput.java
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.util.bkd;
+
+import java.io.IOException;
+import org.apache.lucene.index.PointValues.IntersectVisitor;
+
+/**
+ * Abstraction of a block KD-tree that contains multi-dimensional points in byte[] space.
+ *
+ * @lucene.internal
+ */
+public interface BKDIndexInput {
+
+  /** BKD tree parameters */
+  BKDConfig getConfig();
+
+  /** min packed value */
+  byte[] getMinPackedValue();
+
+  /** max packed value */
+  byte[] getMaxPackedValue();
+
+  /** Total number of points */
+  long getPointCount();
+
+  /** Total number of documents */
+  int getDocCount();
+
+  /** Create a new {@link IndexTree} to navigate the index */
+  IndexTree getIndexTree();
+
+  /** Create a new {@link LeafIterator} to read all leaf nodes */
+  LeafIterator getLeafTreeIterator() throws IOException;

Review comment:
       I have done the change so the BKDWriter uses the IndexTree to visit all the data nodes. I haven't check the performance but I agree that the bottleneck should be the leaf nodes.




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