Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16719

Add ability to retrieve a SolrDocument by its identifier

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 11.8-rc-1
    • 11.7
    • Search - Solr
    • 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?

      Attachments

        Activity

          People

            slauriere slauriere
            slauriere slauriere
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: