You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2025/03/22 17:33:00 UTC
[jira] [Resolved] (SOLR-17706) Make DocumentObjectBinder a static singleton
[ https://issues.apache.org/jira/browse/SOLR-17706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley resolved SOLR-17706.
---------------------------------
Fix Version/s: main (10.0)
Resolution: Fixed
> Make DocumentObjectBinder a static singleton
> --------------------------------------------
>
> Key: SOLR-17706
> URL: https://issues.apache.org/jira/browse/SOLR-17706
> Project: Solr
> Issue Type: Improvement
> Components: SolrJ
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Major
> Labels: pull-request-available
> Fix For: main (10.0)
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> SolrJ's DocumentObjectBinder maps custom objects to solr docs, either way. It reads info about classes via reflection and stores it into a field. I see no reason why this shouldn't be a global singleton since it's basically class metadata; its contents should be stable. Today there's an instance of it on SolrClient and it has quirky use in QueryResponse. I could see how this makes it possible to customize it by a user but there are other ways to do this.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org