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

Allow to set a user when updating the search index

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 14.4.1, 14.5
    • Fix Version/s: None
    • Component/s: Search - Solr
    • Labels:
      None
    • Difficulty:
      Easy
    • Similar issues:

      Description

      See: https://forum.xwiki.org/t/what-to-index-as-the-page-title-for-search/10530

      When indexing pages with a computed title from a sheet, the computed title will not be used by the indexer (and thus not shown in the search results) if the sheet is not visible for the anonymous user. This is especially the case for a wiki closed to anonymous users.

      This can be easily seen when searching for user profiles. On a public wiki the search will show "Profile of Firstname Lastname" while in a closed with it shows "Loginname".

      The likely cause for this is that the search indexer runs without a user in the context, which is interpreted as the anonymous user. As discussed on the forum thread a way to fix this is to allow to explicitly define a user to be used by the indexing thread.

      Steps to implement:

      • define a place to store this user (Main.SolrSearchConfig ? Or separate page?)
      • use the stored user when indexing (if defined)
      • add section to the "search" admin UI to allow admins to define the user
      • test, if a disabled user works, too (likely not)
      • add documentation both in the wiki admin and in the release notes about the what and why for this setting

        Attachments

          Activity

            People

            Assignee:
            camil7 Clemens Robbenhaar
            Reporter:
            camil7 Clemens Robbenhaar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: