You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2020/02/26 17:58:29 UTC
[lucene-solr] branch master updated (61e0b4c -> fc24fa9)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.
from 61e0b4c LUCENE-9252: fix javac linter warnings in spatial-extras (thanks Andras Salamon)
new b4f3efb SOLR-13965: In GraphHandler, support <expressible> configuration and deprecate <streamFunctions> configuration.
new fc24fa9 SOLR-14267: complete <query><HashDocSet> solrconfig.xml removal
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
solr/CHANGES.txt | 3 ++
.../solr/collection1/conf/solrconfig.xml | 6 ----
.../collection1/conf/dataimport-solrconfig.xml | 6 ----
.../collection1/conf/contentstream-solrconfig.xml | 6 ----
.../conf/dataimport-nodatasource-solrconfig.xml | 6 ----
.../collection1/conf/dataimport-solrconfig.xml | 6 ----
.../solr/collection1/conf/solrconfig.xml | 3 --
.../src/java/org/apache/solr/core/SolrConfig.java | 8 +----
.../java/org/apache/solr/handler/GraphHandler.java | 37 +++++++++++++++-------
.../conf/solrconfig-analytics-query.xml | 3 --
.../conf/solrconfig-cache-enable-disable.xml | 3 --
.../conf/solrconfig-collapseqparser.xml | 3 --
.../solr/collection1/conf/solrconfig-elevate.xml | 3 --
.../solr/collection1/conf/solrconfig-minhash.xml | 3 --
.../collection1/conf/solrconfig-plugcollector.xml | 3 --
.../solr/collection1/conf/solrconfig.xml | 3 --
.../src/test-files/solr/crazy-path-to-config.xml | 1 -
solr/solr-ref-guide/src/streaming-expressions.adoc | 4 +--
18 files changed, 32 insertions(+), 75 deletions(-)
[lucene-solr] 02/02: SOLR-14267: complete
solrconfig.xml removal
Posted by cp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit fc24fa95063c368cc446441da56712b464a3706a
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Wed Feb 26 17:42:44 2020 +0000
SOLR-14267: complete <query><HashDocSet> solrconfig.xml removal
---
.../test-files/clustering/solr/collection1/conf/solrconfig.xml | 6 ------
.../dihextras/solr/collection1/conf/dataimport-solrconfig.xml | 6 ------
.../dih/solr/collection1/conf/contentstream-solrconfig.xml | 6 ------
.../solr/collection1/conf/dataimport-nodatasource-solrconfig.xml | 6 ------
.../dih/solr/collection1/conf/dataimport-solrconfig.xml | 6 ------
.../test-files/extraction/solr/collection1/conf/solrconfig.xml | 3 ---
solr/core/src/java/org/apache/solr/core/SolrConfig.java | 8 +-------
.../solr/collection1/conf/solrconfig-analytics-query.xml | 3 ---
.../solr/collection1/conf/solrconfig-cache-enable-disable.xml | 3 ---
.../solr/collection1/conf/solrconfig-collapseqparser.xml | 3 ---
.../src/test-files/solr/collection1/conf/solrconfig-elevate.xml | 3 ---
.../src/test-files/solr/collection1/conf/solrconfig-minhash.xml | 3 ---
.../test-files/solr/collection1/conf/solrconfig-plugcollector.xml | 3 ---
solr/core/src/test-files/solr/collection1/conf/solrconfig.xml | 3 ---
solr/core/src/test-files/solr/crazy-path-to-config.xml | 1 -
15 files changed, 1 insertion(+), 62 deletions(-)
diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
index abf50f8..e8bc13a 100644
--- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
@@ -153,12 +153,6 @@
queryResultCache. -->
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
diff --git a/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml b/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
index 9542960..f9f5304 100644
--- a/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
+++ b/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
@@ -134,12 +134,6 @@
queryResultCache. -->
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
index 2d90e0a..d3ee34c 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
@@ -134,12 +134,6 @@
queryResultCache. -->
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
index ef9c257..2fd15b9 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
@@ -136,12 +136,6 @@
queryResultCache. -->
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
index 3deadfb..ec6e6a9 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
@@ -134,12 +134,6 @@
queryResultCache. -->
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
diff --git a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
index 8a75972..ba9ea59 100644
--- a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
@@ -111,9 +111,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
index 3acb9c6..653be09 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
@@ -215,7 +215,7 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
if (get("query/boolTofilterOptimizer", null) != null)
log.warn("solrconfig.xml: <boolTofilterOptimizer> is currently not implemented and has no effect.");
if (get("query/HashDocSet", null) != null)
- log.warn("solrconfig.xml: <HashDocSet> is deprecated and no longer recommended used.");
+ log.warn("solrconfig.xml: <HashDocSet> is deprecated and no longer used.");
// TODO: Old code - in case somebody wants to re-enable. Also see SolrIndexSearcher#search()
// filtOptEnabled = getBool("query/boolTofilterOptimizer/@enabled", false);
@@ -249,9 +249,6 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
org.apache.solr.search.SolrIndexSearcher.initRegenerators(this);
- hashSetInverseLoadFactor = 1.0f / getFloat("//HashDocSet/@loadFactor", 0.75f);
- hashDocSetMaxSize = getInt("//HashDocSet/@maxSize", 3000);
-
if (get("jmx", null) != null) {
log.warn("solrconfig.xml: <jmx> is no longer supported, use solr.xml:/metrics/reporter section instead");
}
@@ -529,9 +526,6 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
public final boolean useRangeVersionsForPeerSync;
- // DocSet
- public final float hashSetInverseLoadFactor;
- public final int hashDocSetMaxSize;
// IndexConfig settings
public final SolrIndexConfig indexConfig;
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
index 6aa7bea..1ea6a0a 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
@@ -124,9 +124,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml
index 6997eaf..c01fb61 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml
@@ -60,9 +60,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
index eda755d..6d077fb 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
@@ -124,9 +124,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
index 4123314..75d36c9 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
@@ -76,9 +76,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
index 207ae62..9b973db 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
@@ -136,9 +136,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
index 9ffcd8f..fd86f96 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
@@ -123,9 +123,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index ac2d5c9..f57b149 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -135,9 +135,6 @@
<queryResultWindowSize>10</queryResultWindowSize>
- <!-- set maxSize artificially low to exercise both types of sets -->
- <HashDocSet maxSize="3" loadFactor="0.75"/>
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause exceeds
the threshold (represented as a fraction of the total index)
diff --git a/solr/core/src/test-files/solr/crazy-path-to-config.xml b/solr/core/src/test-files/solr/crazy-path-to-config.xml
index d239c9d..1c6f64f 100644
--- a/solr/core/src/test-files/solr/crazy-path-to-config.xml
+++ b/solr/core/src/test-files/solr/crazy-path-to-config.xml
@@ -34,7 +34,6 @@
<maxBooleanClauses>${solr.max.booleanClauses:1024}</maxBooleanClauses>
<useFilterForSortedQuery>true</useFilterForSortedQuery>
<queryResultWindowSize>10</queryResultWindowSize>
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
<boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
</query>
[lucene-solr] 01/02: SOLR-13965: In GraphHandler,
support configuration and deprecate
configuration.
Posted by cp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit b4f3efbf94e20cf0687c5a8f7b255eb48c1d8e78
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Wed Feb 26 17:36:33 2020 +0000
SOLR-13965: In GraphHandler, support <expressible> configuration and deprecate <streamFunctions> configuration.
(Eric Pugh via Christine Poerschke)
Closes #1033 pull request.
---
solr/CHANGES.txt | 3 ++
.../java/org/apache/solr/handler/GraphHandler.java | 37 +++++++++++++++-------
solr/solr-ref-guide/src/streaming-expressions.adoc | 4 +--
3 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 26f46b9..26cbf9b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -62,6 +62,9 @@ New Features
* SOLR-14241: New delete() Stream Decorator (hossman)
+ * SOLR-13965: In GraphHandler, support <expressible> configuration and deprecate <streamFunctions> configuration.
+ (Eric Pugh via Christine Poerschke)
+
Improvements
---------------------
* SOLR-14120: Define JavaScript methods 'includes' and 'startsWith' to ensure AdminUI can be displayed when using
diff --git a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java b/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
index a50855d..bed4086 100644
--- a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
@@ -54,6 +54,28 @@ import org.slf4j.LoggerFactory;
/**
+ * <p>
+ * Solr Request Handler for graph traversal with streaming functions that responds with GraphML markup.
+ * </p>
+ * <p>
+ * It loads the default set of streaming expression functions via {@link org.apache.solr.client.solrj.io.stream.expr.DefaultStreamFactory}.
+ * </p>
+ * <p>
+ * To add additional functions, just define them as plugins in solrconfig.xml via
+ * {@code
+ * <expressible name="count" class="org.apache.solr.client.solrj.io.stream.RecordCountStream" />
+ * }
+ * </p>
+ * <p>
+ * The @deprecated configuration method as of Solr 8.5 is
+ * {@code
+ * <lst name="streamFunctions">
+ * <str name="group">org.apache.solr.client.solrj.io.stream.ReducerStream</str>
+ * <str name="count">org.apache.solr.client.solrj.io.stream.RecordCountStream</str>
+ * </lst>
+ * }
+ *</p>
+ *
* @since 6.1.0
*/
public class GraphHandler extends RequestHandlerBase implements SolrCoreAware, PermissionNameProvider {
@@ -68,17 +90,6 @@ public class GraphHandler extends RequestHandlerBase implements SolrCoreAware, P
}
public void inform(SolrCore core) {
-
- /* The stream factory will always contain the zkUrl for the given collection
- * Adds default streams with their corresponding function names. These
- * defaults can be overridden or added to in the solrConfig in the stream
- * RequestHandler def. Example config override
- * <lst name="streamFunctions">
- * <str name="group">org.apache.solr.client.solrj.io.stream.ReducerStream</str>
- * <str name="count">org.apache.solr.client.solrj.io.stream.RecordCountStream</str>
- * </lst>
- * */
-
String defaultCollection;
String defaultZkhost;
CoreContainer coreContainer = core.getCoreContainer();
@@ -92,8 +103,12 @@ public class GraphHandler extends RequestHandlerBase implements SolrCoreAware, P
}
// This pulls all the overrides and additions from the config
+ StreamHandler.addExpressiblePlugins(streamFactory, core);
+
+ // Check deprecated approach.
Object functionMappingsObj = initArgs.get("streamFunctions");
if(null != functionMappingsObj){
+ log.warn("solrconfig.xml: <streamFunctions> is deprecated for adding additional streaming functions to GraphHandler.");
NamedList<?> functionMappings = (NamedList<?>)functionMappingsObj;
for(Entry<String,?> functionMapping : functionMappings) {
String key = functionMapping.getKey();
diff --git a/solr/solr-ref-guide/src/streaming-expressions.adoc b/solr/solr-ref-guide/src/streaming-expressions.adoc
index 46639cb..a49afca 100644
--- a/solr/solr-ref-guide/src/streaming-expressions.adoc
+++ b/solr/solr-ref-guide/src/streaming-expressions.adoc
@@ -135,10 +135,10 @@ The value of `shards.preference` that is used to route requests is determined in
=== Adding Custom Expressions
Creating your own custom expressions can be easily done by implementing the {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/io/stream/expr/Expressible.html[Expressible] interface. To add a custom expression to the
-list of known mappings for the `/stream` handler, you just need to declare it as a plugin in `solrconfig.xml` via:
+list of known mappings for the `/stream` and `/graph` handlers, you just need to declare it as a plugin in `solrconfig.xml` via:
[source,xml]
-<expressible name="custom" class="org.example.CustomStreamingExpression"/>
+<expressible name="custom" class="org.example.CustomStreamingExpression"/>
== Types of Streaming Expressions