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
      • exportFullTextSearchDataStore

        void exportFullTextSearchDataStore​(Path destinationPath,
                                           org.eclipse.core.runtime.IProgressMonitor monitor,
                                           ISearchIndexExporter exporter)
                                    throws IOException
        Exports full text search data store to a specified destination
        Parameters:
        destinationPath - A path to export data to. May not be null
        monitor - A progress monitor to control/monitor export process. May not be null
        exporter - Exporting logic. May not be NullPointerException
        Throws:
        IOException