You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/03/10 09:53:52 UTC

[lucene] 06/08: configure() should use a method that implements MapWriter

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch jira/solr14977
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 71c52f68d1a4e7dbce8eb6a758cba36c173a524f
Author: noblepaul <no...@gmail.com>
AuthorDate: Mon Nov 16 23:37:21 2020 +1100

    configure() should use a method that implements MapWriter
---
 solr/CHANGES.txt                                            | 13 ++++++++++++-
 .../src/java/org/apache/solr/api/ConfigurablePlugin.java    |  4 +++-
 .../java/org/apache/solr/api/ContainerPluginsRegistry.java  |  4 ++--
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0dd9f18..28c9ab4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -151,6 +151,8 @@ Other Changes
 
 * SOLR-14978: Enable OOM Killer Script in Solr Foreground. Simplify getting heap dumps on OOM. (Mike Drob, Houston Putman)
 
+* SOLR-14949: Ability to customize docker image name/base image (Houston Putman)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
@@ -172,9 +174,11 @@ Improvements
 
 * SOLR-14955: Add env var options for the Prometheus Exporter bin scripts (Houston Putman)
 
+* SOLR-14683: Metrics API should ensure consistent placeholders for missing values. (ab)
+
 Optimizations
 ---------------------
-(No changes)
+* SOLR-14975: Optimize CoreContainer.getAllCoreNames, getLoadedCoreNames and getCoreDescriptors. (Bruno Roustant)
 
 Bug Fixes
 ---------------------
@@ -188,11 +192,18 @@ Bug Fixes
 
 * SOLR-14961: Fix for deleting zookeeper nodes with same path length. Only the first zk-node was removed. (Michael Aleythe via Mike Drob)
 
+* SOLR-14971: AtomicUpdate 'remove', 'add-distinct' operations now works on numeric, date fields in uncommitted docs (Jason Gerlowski)
+
+* SOLR-14983: Fix response returning original score instead of reranked score due to query and filter combining.
+  (Krishan Goyal, Jason Baik, Christine Poerschke)
+
 Other Changes
 ---------------------
 
 * SOLR-14954: Heavily edit reindexing.adoc (Sameul García Martínez and Erick Erickson)
 
+* SOLR-14995: Update Jetty to 9.4.34 (Mike Drob)
+
 ==================  8.7.0 ==================
 
 Consult the lucene/CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/api/ConfigurablePlugin.java b/solr/core/src/java/org/apache/solr/api/ConfigurablePlugin.java
index e549bac..ef13d8a 100644
--- a/solr/core/src/java/org/apache/solr/api/ConfigurablePlugin.java
+++ b/solr/core/src/java/org/apache/solr/api/ConfigurablePlugin.java
@@ -17,11 +17,13 @@
 
 package org.apache.solr.api;
 
+import org.apache.solr.common.MapWriter;
+
 /**Implement this interface if your plugin needs to accept some configuration
  * 
  * @param <T> the configuration Object type
  */
-public interface ConfigurablePlugin<T> {
+public interface ConfigurablePlugin<T extends MapWriter> {
 
   /**This is invoked soon after the Object is initialized
    * 
diff --git a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
index 62dab20..158bcf6 100644
--- a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
+++ b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
@@ -391,9 +391,9 @@ public class ContainerPluginsRegistry implements ClusterPropertiesListener, MapW
         throw new RuntimeException("Must have a no-arg constructor or CoreContainer constructor ");
       }
       if (instance instanceof ConfigurablePlugin) {
-        Class c = getConfigClass((ConfigurablePlugin<?>) instance);
+        Class<? extends MapWriter> c = getConfigClass((ConfigurablePlugin<? extends MapWriter>) instance);
         if (c != null) {
-          Object initVal = mapper.readValue(Utils.toJSON(holder.original), c);
+          MapWriter initVal = mapper.readValue(Utils.toJSON(holder.original), c);
           ((ConfigurablePlugin) instance).configure(initVal);
         }
       }