|
19 | 19 |
|
20 | 20 | import java.io.IOException; |
21 | 21 | import java.lang.invoke.MethodHandles; |
22 | | -import java.util.Collections; |
23 | 22 | import java.util.List; |
24 | 23 | import java.util.Map; |
25 | | -import java.util.Map.Entry; |
26 | 24 | import org.apache.solr.client.solrj.io.SolrClientCache; |
27 | 25 | import org.apache.solr.client.solrj.io.Tuple; |
28 | 26 | import org.apache.solr.client.solrj.io.comp.StreamComparator; |
|
32 | 30 | import org.apache.solr.client.solrj.io.stream.TupleStream; |
33 | 31 | import org.apache.solr.client.solrj.io.stream.expr.DefaultStreamFactory; |
34 | 32 | import org.apache.solr.client.solrj.io.stream.expr.Explanation; |
35 | | -import org.apache.solr.client.solrj.io.stream.expr.Expressible; |
36 | 33 | import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; |
37 | 34 | import org.apache.solr.common.params.CommonParams; |
38 | 35 | import org.apache.solr.common.params.ModifiableSolrParams; |
39 | 36 | import org.apache.solr.common.params.SolrParams; |
40 | 37 | import org.apache.solr.common.params.StreamParams; |
41 | | -import org.apache.solr.common.util.NamedList; |
42 | 38 | import org.apache.solr.core.CoreContainer; |
43 | | -import org.apache.solr.core.PluginInfo; |
44 | | -import org.apache.solr.core.SolrConfig; |
45 | 39 | import org.apache.solr.core.SolrCore; |
46 | 40 | import org.apache.solr.request.SolrQueryRequest; |
47 | 41 | import org.apache.solr.response.SolrQueryResponse; |
|
60 | 54 | * |
61 | 55 | * <p>To add additional functions, just define them as plugins in solrconfig.xml via {@code |
62 | 56 | * <expressible name="count" class="org.apache.solr.client.solrj.io.stream.RecordCountStream" />} |
63 | | - * |
64 | | - * <p>The @deprecated configuration method as of Solr 8.5 is {@code <lst name="streamFunctions"><str |
65 | | - * name="group">org.apache.solr.client.solrj.io.stream.ReducerStream</str><str |
66 | | - * name="count">org.apache.solr.client.solrj.io.stream.RecordCountStream</str></lst> } |
67 | | - * |
68 | | - * @since 6.1.0 |
69 | 57 | */ |
70 | 58 | public class GraphHandler extends RequestHandlerBase |
71 | 59 | implements SolrCoreAware, PermissionNameProvider { |
@@ -97,34 +85,6 @@ public void inform(SolrCore core) { |
97 | 85 |
|
98 | 86 | // This pulls all the overrides and additions from the config |
99 | 87 | StreamHandler.addExpressiblePlugins(streamFactory, core); |
100 | | - |
101 | | - // Check deprecated approach. |
102 | | - Object functionMappingsObj = initArgs.get("streamFunctions"); |
103 | | - if (null != functionMappingsObj) { |
104 | | - log.warn( |
105 | | - "solrconfig.xml: <streamFunctions> is deprecated for adding additional streaming functions to GraphHandler."); |
106 | | - NamedList<?> functionMappings = (NamedList<?>) functionMappingsObj; |
107 | | - for (Entry<String, ?> functionMapping : functionMappings) { |
108 | | - String key = functionMapping.getKey(); |
109 | | - PluginInfo pluginInfo = |
110 | | - new PluginInfo(key, Collections.singletonMap("class", functionMapping.getValue())); |
111 | | - |
112 | | - if (pluginInfo.pkgName == null) { |
113 | | - Class<? extends Expressible> clazz = |
114 | | - core.getResourceLoader() |
115 | | - .findClass((String) functionMapping.getValue(), Expressible.class); |
116 | | - streamFactory.withFunctionName(key, clazz); |
117 | | - } else { |
118 | | - @SuppressWarnings("resource") |
119 | | - StreamHandler.ExpressibleHolder holder = |
120 | | - new StreamHandler.ExpressibleHolder( |
121 | | - pluginInfo, |
122 | | - core, |
123 | | - SolrConfig.classVsSolrPluginInfo.get(Expressible.class.getName())); |
124 | | - streamFactory.withFunctionName(key, holder); |
125 | | - } |
126 | | - } |
127 | | - } |
128 | 88 | } |
129 | 89 |
|
130 | 90 | @Override |
|
0 commit comments