Interface IIndexSearcher


  • public interface IIndexSearcher
    The main service providing methods for searching text content.
    • Method Detail

      • searchInIndex

        org.eclipse.core.runtime.IStatus searchInIndex​(String searchString,
                                                       boolean caseSensitive,
                                                       Set<SearchFor> searchFors,
                                                       Set<SearchIn> searchIns,
                                                       Set<SearchScope> searchScopes,
                                                       Set<String> projectNames,
                                                       ISearchResultCollector searchResultCollector,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
                                                throws org.eclipse.core.runtime.CoreException,
                                                       org.eclipse.core.runtime.OperationCanceledException
        Performs search of the given string.
        Parameters:
        searchString - the string to search.
        caseSensitive - the flag showing whether the case matters.
        searchFors - what to search for.
        searchIns - where to search.
        searchScopes - the search scope.
        projectNames - the names of the projects where to search.
        searchResultCollector - the callback that will be invoked each time a match is found.
        monitor - the progress monitor.
        Returns:
        OK status
        Throws:
        org.eclipse.core.runtime.CoreException - in case there are problems with reading the index.
        org.eclipse.core.runtime.OperationCanceledException - in case operation is cancelled by the user.
      • searchInIndex

        org.eclipse.core.runtime.IStatus searchInIndex​(SearchType indexType,
                                                       String searchString,
                                                       boolean caseSensitive,
                                                       Set<SearchFor> searchFors,
                                                       Set<SearchIn> searchIns,
                                                       Set<SearchScope> searchScopes,
                                                       Set<String> projectNames,
                                                       ISearchResultCollector searchResultCollector,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
                                                throws org.eclipse.core.runtime.CoreException,
                                                       org.eclipse.core.runtime.OperationCanceledException
        Performs search of the given string in the specified index.
        Parameters:
        indexType - Type of the index.
        searchString - the string to search.
        caseSensitive - the flag showing whether the case matters.
        searchFors - what to search for.
        searchIns - where to search.
        searchScopes - the search scope.
        projectNames - the names of the projects where to search.
        searchResultCollector - the callback that will be invoked each time a match is found.
        monitor - the progress monitor.
        Returns:
        OK status
        Throws:
        org.eclipse.core.runtime.CoreException - in case there are problems with reading the index.
        org.eclipse.core.runtime.OperationCanceledException - in case operation is cancelled by the user.