Class SearchService


  • @Component
    public class SearchService
    extends Object
    This service is used for searching spaces. It expands lucene search with additional features, f.e. ability to run additional checks against the database.
    Since:
    7.16
    • Constructor Detail

    • Method Detail

      • spaces

        public SearchResults spaces​(String titleOrSpaceKey,
                                    boolean spacesWithRetentionPoliciesOnly)
                             throws InvalidSearchException
        Method performs full-text search of the Spaces based on provided space titleOrSpaceKey using lucene index. This method allows only to search all spaces, or only spaces with re-defined retention rules. Retention rules are checked against database, and not based on retention rules information in the index.
        Parameters:
        titleOrSpaceKey - - title or space key of the space. Wildcard search is performed against the title AND space key
        spacesWithRetentionPoliciesOnly - - true if search needs to be performed only among spaces with overridden retention rules
        Returns:
        SearchResults with all the spaces with retention rules, which satisfy titleOrSpaceKey criteria
        Throws:
        InvalidSearchException - if the search failed