torvalds-dev / solr

Apache Solr open-source search software
https://solr.apache.org/
Apache License 2.0
0 stars 0 forks source link

Make CoreSorter class configurable #11

Open Raghavan1988 opened 1 year ago

Raghavan1988 commented 1 year ago

I would like to be able to configure how cores are sorted before being loaded to accommodate more specific needs.

For this purpose, I propose to make the CoreSorter instance configurable, pretty much like other services (e.g., ConfigSetService, CoresLocator) are already configurable. Attached PR creates a new "coreSorter" parameter in solr.xml in order to achieve this.

Example usage:

com.myorg.CustomCoreSorter
torvalds-dev commented 1 year ago

torvalds.dev is analyzing the ticket

torvalds-dev commented 1 year ago

From the information provided, it seems like you want to make the CoreSorter class in Solr configurable. This would allow you to specify the order in which cores are loaded, which could be useful for optimizing performance or meeting specific application requirements.

Here's a plan to achieve this:

  1. Modify the CoreSorter class to make it configurable. This would likely involve adding methods to set and get the sorting criteria.

  2. Update the solr.xml file to include a new parameter for the CoreSorter. This parameter would specify the class that should be used for sorting cores. In your example, this is "com.myorg.CustomCoreSorter".

  3. Update the code that uses the CoreSorter to use the new configurable version. This would likely be in the CoreContainer class, which appears to be responsible for managing cores.

The relevant files for this task would be:

  1. The CoreSorter class file. This is where you would make the class configurable.

  2. The solr.xml file. This is where you would add the new parameter for the CoreSorter.

  3. The CoreContainer class file. This is where you would update the code to use the new configurable CoreSorter.

Please note that the exact file names and locations may vary depending on your specific Solr setup.