diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiPointValues.java b/lucene/core/src/java/org/apache/lucene/index/MultiPointValues.java deleted file mode 100644 index dcc33da4aed..00000000000 --- a/lucene/core/src/java/org/apache/lucene/index/MultiPointValues.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 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.index; - - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.lucene.util.StringHelper; - -/** Merges multiple {@link PointValues} into a single one. */ -public class MultiPointValues extends PointValues { - - private final List subs; - private final List docBases; - - private MultiPointValues(List subs, List docBases) { - this.subs = subs; - this.docBases = docBases; - } - - /** Returns a {@link PointValues} merging all point values from the provided reader. */ - public static PointValues get(IndexReader r) { - final List leaves = r.leaves(); - final int size = leaves.size(); - if (size == 0) { - return null; - } else if (size == 1) { - return leaves.get(0).reader().getPointValues(); - } - - List values = new ArrayList<>(); - List docBases = new ArrayList<>(); - for (int i = 0; i < size; i++) { - LeafReaderContext context = leaves.get(i); - PointValues v = context.reader().getPointValues(); - if (v != null) { - values.add(v); - docBases.add(context.docBase); - } - } - - if (values.isEmpty()) { - return null; - } - - return new MultiPointValues(values, docBases); - } - - /** Finds all documents and points matching the provided visitor */ - public void intersect(String fieldName, IntersectVisitor visitor) throws IOException { - for(int i=0;i 0) { - b.append(", "); - } - b.append("docBase="); - b.append(docBases.get(i)); - b.append(" sub=" + subs.get(i)); - } - b.append(')'); - return b.toString(); - } - - @Override - public byte[] getMinPackedValue(String fieldName) throws IOException { - byte[] result = null; - for(int i=0;i 0) { - System.arraycopy(maxPackedValue, offset, result, offset, bytesPerDim); - } - } - } - } - - return result; - } - - @Override - public int getNumDimensions(String fieldName) throws IOException { - for(int i=0;i