Package com._1c.g5.v8.dt.platform.doc
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 Summary
Modifier and TypeMethodDescriptionList<? extends IFullTextSearchResult>doSearch(int offset, int length, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Does new full-text search and returns list of results.intgetCount()Gets full results count.Gets highlight terms.List<? extends IFullTextSearchResult>listResults(int offset, int length) Gets search results range from cache as list.
-
Method Details
-
getCount
int getCount()Gets full results count.- Returns:
- results count.
-
listResults
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
nullif 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 fromlistResults(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 <- offsetprogressMonitor- progress monitor. Nevernull- Returns:
- search results range list. Never
null
-
getHighlightTerms
Collection<String> getHighlightTerms()Gets highlight terms.- Returns:
- highlight terms collection. Never
null
-