Class ReIndexUtils

java.lang.Object
com.atlassian.confluence.search.ReIndexUtils

public final class ReIndexUtils extends Object
Utility class containing shared constants and static methods for ReIndexOption operations. This class provides common functionality that was previously in the ReIndexOption enum.
Since:
10.1
  • Field Details

    • ATTACHMENT_ONLY_QUERY

      public static final SearchQuery ATTACHMENT_ONLY_QUERY
    • USER_ONLY_QUERY

      public static final SearchQuery USER_ONLY_QUERY
    • CONTENT_ONLY_QUERY

      public static final SearchQuery CONTENT_ONLY_QUERY
    • ATTACHMENT_ONLY_IN_SPACE_QUERY

      public static final Function<String,SearchQuery> ATTACHMENT_ONLY_IN_SPACE_QUERY
    • CONTENT_ONLY_IN_SPACE_QUERY

      public static final Function<String,SearchQuery> CONTENT_ONLY_IN_SPACE_QUERY
    • USER_CLASS

      public static final Predicate<String> USER_CLASS
    • ATTACHMENT_CLASS

      public static final Predicate<String> ATTACHMENT_CLASS
    • CONTENT_CLASSES

      public static final Predicate<String> CONTENT_CLASSES
  • Method Details

    • isFullReindex

      public static boolean isFullReindex(Set<ReIndexSupport> options)
      Check if the given set of options represents a full reindex.
      Parameters:
      options - the set of ReIndexOption values
      Returns:
      true if this represents a full reindex
    • fullReindex

      public static Set<ReIndexSupport> fullReindex()
      Get the default full reindex options.
      Returns:
      Set containing all reindex options
    • fullReindex

      public static Set<ReIndexSupport> fullReindex(boolean reindexingSite)
      Get the full reindex options, optionally excluding users for site reindexing.
      Parameters:
      reindexingSite - true if Confluence is re-indexing the whole site
      Returns:
      Set containing appropriate reindex options
    • fromApiEnumSet

      public static EnumSet<ReIndexOption> fromApiEnumSet(EnumSet<ReIndexOption> apiOptions, boolean reindexingSite)