Interface IFullTextSearchResults

All Known Implementing Classes:
FullTextSearchResults, PlatformDocLuceneSearchResults, PlatformDocPrimarySearchResults

public interface IFullTextSearchResults
An interface which manages full-text search which supports caching results. To gets cached results one should call a listResults(int, int) method. This method works fast but may return null if needed results has not cached or cache is inalidated. In this case to get these search results one should call a doSearch(int, int, IProgressMonitor) method. This method may be very slow but it always returns right results and support canceling by IProgressMonitor.isCancelled method. A getCount() method always return correct value even cache is empty.
  • Method Details

    • getCount

      int getCount()
      Gets full results count.
      Returns:
      results count.
    • listResults

      List<? extends IFullTextSearchResult> listResults(int offset, int length)
      Gets search results range from cache as list.
      Parameters:
      offset - offset of search results range. Should be >= 0 and < getCount()
      length - length of search results range. Should be > 0 and < - offset
      Returns:
      search results range list. May be null if this range is not cached
    • doSearch

      List<? extends IFullTextSearchResult> doSearch(int offset, int length, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Does new full-text search and returns list of results. This method may cache found search results and they may be got from listResults(int, int) next time.
      Parameters:
      offset - offset of search results range. Should be >= 0 and < getCount()
      length - length of search results range. Should be > 0 and < - offset
      progressMonitor - progress monitor. Never null
      Returns:
      search results range list. Never null
    • getHighlightTerms

      Collection<String> getHighlightTerms()
      Gets highlight terms.
      Returns:
      highlight terms collection. Never null