Close
dtSearch Engine API for Java
SearchFilter.selectItemsBySearch Method

Set the selection state of all documents in an index that match search request.

Syntax
Java
public native int selectItemsBySearch(int iIndex, String searchRequest, boolean fSelected);
Parameters
Description
String searchRequest
What to search for. The searchRequest can contain File Conditions (such as filename or date searches) in addition to text searches.
boolean fSelected
Selection state to apply to the documents matching the search request.
whichIndex
Value returned by addIndex() to identify this index in the SearchFilter

Returns the number of documents that matched the search, or a negative value if the search failed.

Another way to generate a SearchFilter from the results of a search is to use SearchJob and call setWantResultsAsFilter(true) before executing the search. After the search is done. call SearchJob.getResultsAsFilter() to get a SearchFilter containing the results of the search.