[ 
https://issues.apache.org/jira/browse/SOLR-17706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937612#comment-17937612
 ] 

ASF subversion and git services commented on SOLR-17706:
--------------------------------------------------------

Commit 1f05e73c20379317a25b587a9c541702b86575f8 in solr's branch 
refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=1f05e73c203 ]

SOLR-17706: SolrJ DocumentObjectBinder, make a singleton (#3271)

DocumentObjectBinder should be singleton.
Remove from SolrClient, and thus update QueryResponse to not get it from there.
Use Java SPI/ServiceLoader to allow someone to customize.  (Manually tested)
Use ConcurrentHashMap.computeIfAbsent internally.

> 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
>          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-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to