romseygeek commented on a change in pull request #543:
URL: https://github.com/apache/lucene/pull/543#discussion_r779399519



##########
File path: lucene/facet/src/java/org/apache/lucene/facet/MultiDoubleValues.java
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.facet;
+
+import java.io.IOException;
+import org.apache.lucene.search.DoubleValues;
+
+/**
+ * Per-segment, per-document double values, which can be calculated at 
search-time. Documents may
+ * produce multiple values. See also {@link DoubleValues} for a single-valued 
version.
+ *
+ * <p>Currently meant only for use within the faceting module. Could be 
further generalized and made
+ * available for more use-cases outside faceting if there is a desire to do so.
+ *
+ * @lucene.experimental
+ */
+public abstract class MultiDoubleValues {
+
+  /** Instantiates a new MultiDoubleValues */

Review comment:
       I don't think these empty constructors on abstract classes are necessary?

##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java
##########
@@ -92,43 +113,71 @@ public LongValueFacetCounts(String field, LongValuesSource 
valueSource, FacetsCo
    * {@link org.apache.lucene.search.MatchAllDocsQuery}, but is more efficient.
    */
   public LongValueFacetCounts(String field, IndexReader reader) throws 
IOException {
-    this(field, null, reader);
+    this(field, (MultiLongValuesSource) null, reader);
   }
 
   /**
    * Counts all facet values for the provided {@link LongValuesSource} if 
non-null. If {@code
    * valueSource} is null, doc values from the provided {@code field} will be 
used. This produces
    * the same result as computing facets on a {@link 
org.apache.lucene.search.MatchAllDocsQuery},
    * but is more efficient.
+   *

Review comment:
       Do we need to deprecate this constructor? It's still useful in many 
cases as I understand it.

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
##########
@@ -222,8 +331,30 @@ public boolean isCacheable(LeafReaderContext ctx) {
    *
    * @param fastMatchQuery a query to use as a filter
    * @param valueSource the source of values for the range check
+   * @deprecated Counting from a user-provided DoubleValuesSource is being 
deprecated in favor of

Review comment:
       Again, I don't think we need to deprecate the single-valued API; it will 
be better performing if the input values are truly single-valued anyway, right?




-- 
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-unsubscr...@lucene.apache.org

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



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

Reply via email to