Interface ITextSearchIndex


  • public interface ITextSearchIndex
    Text search index interface
    • Method Detail

      • start

        void start()
            throws IOException
        Start index
        Throws:
        IOException - if the directory cannot be read/written to, or if there is any other low-level IO error
      • shutdown

        void shutdown()
        Shutdown index
      • clean

        void clean()
        Clean index
      • indexFile

        void indexFile​(Collection<org.eclipse.core.resources.IFile> files)
                throws IOException
        Add or update given files in index
        Parameters:
        files - collection of files
        Throws:
        IOException - if the directory cannot be read/written to, or if there is any other low-level IO error
      • removeFile

        void removeFile​(Collection<org.eclipse.core.resources.IFile> files)
                 throws IOException
        Remove given files from index
        Parameters:
        files - collection of files for
        Throws:
        IOException - if the directory cannot be read/written to, or if there is any other low-level IO error
      • search

        void search​(ITextSearchQuery query,
                    ITextSearchResultCollector resultCollector,
                    org.eclipse.core.runtime.IProgressMonitor monitor)
             throws IOException
        Search specified query in index
        Parameters:
        query - for searching in index, cannot be null
        resultCollector - the callback that will be invoked each time a match is found, cannot be null
        monitor - the progress monitor, can be null
        Throws:
        IOException - if the directory cannot be read/written to, or if there is any other low-level IO error