Class NumFieldLimitingUpdateRequestProcessorFactory
- All Implemented Interfaces:
NamedListInitializedPlugin
The URP uses the core's SolrIndexSearcher to judge the current number of fields.
Accordingly, it undercounts the number of fields in the core - missing all fields added since the
previous searcher was opened. As such, the URP's request-blocking is "best effort" - it cannot be
relied on as a precise limit on the number of fields.
Additionally, the field-counting includes all documents present in the index, including any deleted docs that haven't yet been purged via segment merging. Note that this can differ significantly from the number of fields defined in managed-schema.xml - especially when dynamic fields are enabled. The only way to reduce this field count is to delete documents and wait until the deleted documents have been removed by segment merges. Users may of course speed up this process by tweaking Solr's segment-merging, triggering an "optimize" operation, etc.
NumFieldLimitingUpdateRequestProcessorFactory accepts two configuration parameters:
maxFields- (required) The maximum number of fields before update requests should be aborted. Once this limit has been exceeded, additional update requests will fail until fields have been removed or the "maxFields" is increased.warnOnly- (optional) Iftruethen the URP logs verbose warnings about the limit being exceeded but doesn't abort update requests. Defaults tofalseif not specified
- Since:
- 9.7.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory
UpdateRequestProcessorFactory.RunAlways -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) voidinit(org.apache.solr.common.util.NamedList<?> args) initwill be called just once, immediately after creation.
-
Constructor Details
-
NumFieldLimitingUpdateRequestProcessorFactory
public NumFieldLimitingUpdateRequestProcessorFactory()
-
-
Method Details
-
init
public void init(org.apache.solr.common.util.NamedList<?> args) Description copied from interface:NamedListInitializedPlugininitwill be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Parameters:
args- non-null list of initialization parameters (may be empty)
-
getInstance
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) - Specified by:
getInstancein classUpdateRequestProcessorFactory
-