Close
dtSearch Engine API for Java
IndexJob.setFoldersToIndex Method

Space-delimited list of folders (or files) to index (add <+> after a folder name to include subfolders).

Syntax
Java
public void setFoldersToIndex(String newFoldersToIndex);

Use setFoldersToIndex to list names of the folders to be indexed, with a space between each folder name.

  • If a folder name contains a space, it should be quoted.
  • A <+> at the end of a folder name indicates that subfolders should be included.
  • You can also include filenames in the list

Example:

"C:My Documents<+>" "C:Your Documents<+>"

A file will be indexed if it matches one of the IncludeFilters and does not match any of the ExcludeFilters. 

Filenames can also be added to FoldersToIndex, so to add c:\docs\sample.doc to the index, add "c:\docs\sample.doc" to FoldersToIndex (this is more efficient than adding "c:\docs" to FoldersToIndex and setting IncludeFilters to "sample.doc").