Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-27675

search indexing doesn't work correctly when storing content in the database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Incorporated
    • Affects Version/s: 2.7.2, 2.8.0
    • Fix Version/s: None
    • Component/s: Search
    • Labels:
      None
    • Previous Issue Keys:
      SAK-20752, SRCH-54

      Description

      The search digester is not correctly written to cater for when content is stored in the database. The method getDigestStorePath is supposed to return null if the system is not storing content on the filesystem.

      However it incorrectly assumes that ServerConfigurationService.getString("some.prop") will return null if a property is not set, when in fact the SCS returns an empty string "". This then means that the result of this method is not null and actually returns a value. This causes errors like:

      2011-06-26 11:37:37,097 ERROR IndexManager org.sakaiproject.search.util.DigestStorageUtil - error creating digestStorePath: //searchdigest/

      public String getDigestStoragePath() {
      String customPath = ServerConfigurationService.getString("search.digestPath");
      String storePath = null;
      if (customPath == null) {
      storePath = ServerConfigurationService.getString("bodyPath@org.sakaiproject.content.api.ContentHostingService");
      if (storePath == null)

      { return null; }

      } else

      { storePath = customPath; }

      return storePath + "/" + DIGEST_STORE_FOLDER;
      }

      The solution is to instead check if the value is null or is blank/empty, ie StringUtils.isBlank.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  steve.swinsburg Steve Swinsburg
                  Reporter:
                  steve.swinsburg Steve Swinsburg
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration