ResourceIndexListener.postIndex creates a sharing record for every document written to a protected index. The only discriminator available to a provider is typeField(), which selects between registered types on a shared index (ResourcePluginInfo.java:192-207). There is no way to declare that a document is not a resource at all.
.plugins-ml-model is the concrete case: it holds one document per model chunk (MLModelManager.java:1042-1047, IMMEDIATE refresh), so protecting the type creates a parentless sharing record per chunk every time a chunked local model is registered.
A plugin can work around it by stamping a discriminator on the resource document only and declaring that as typeField() — chunks then resolve to no provider and are skipped at ResourceIndexListener.java:76-86 — but that logs a WARN per skipped write, which reads as an error and is not one.
Requests:
- A provider-level way to declare that a document in a protected index is not a resource.
- Downgrade the "type is not declared as a protected type" warning for indices that legitimately hold non-resource documents.
Note for implementers: a presence check on a numeric field cannot reuse extractFieldFromIndexOp, which reads stringValue() / binaryValue() only (ResourcePluginInfo.java:154-167). chunk_number is mapped long.
ResourceIndexListener.postIndexcreates a sharing record for every document written to a protected index. The only discriminator available to a provider istypeField(), which selects between registered types on a shared index (ResourcePluginInfo.java:192-207). There is no way to declare that a document is not a resource at all..plugins-ml-modelis the concrete case: it holds one document per model chunk (MLModelManager.java:1042-1047, IMMEDIATE refresh), so protecting the type creates a parentless sharing record per chunk every time a chunked local model is registered.A plugin can work around it by stamping a discriminator on the resource document only and declaring that as
typeField()— chunks then resolve to no provider and are skipped atResourceIndexListener.java:76-86— but that logs a WARN per skipped write, which reads as an error and is not one.Requests:
Note for implementers: a presence check on a numeric field cannot reuse
extractFieldFromIndexOp, which readsstringValue()/binaryValue()only (ResourcePluginInfo.java:154-167).chunk_numberis mappedlong.