Details
-
Improvement
-
Resolution: Fixed
-
Major
-
11.7
-
None
-
Trivial
-
N/A
-
N/A
-
Pull Request accepted
-
Description
Currently, AbstractSolrInstance declares protected access to the SolrClient it contains. This prevents external services to retrieve a given SolrDocument for performing some operations on it. In the general case, it's not needed since the fields extraction process is occurs within a dedicated document extractor, and it may increase the index safety. However, in some other cases encountered for instance in application-page-relations, there's a need, when indexing a document, to also update the index of other documents. A way to implement this currently has consisted in creating a derived SolrInstance exposing the method below. This works fine, however this requires to modify "xwiki.properties" in order to configure the corresponding "solr.type", which involves restarting the server.
This issue is about proposing the addition of the following method to AbstractSolrInstance, or any similar mechanism enabling external access to SolrDocuments:
public SolrDocument getSolrDocument(String id) throws IOException, SolrServerException { return this.server.getById(id); }
What do you think?