The file document specification can have one or more directory nodes controlling which directories are indexed as a part of this document specification. Each directory can be filtered with include or exclude patterns allowing fine grained control over which files are indexed. Regular expressions can be used for the patterns to allow for maximum flexibility.
Include
<include>
The items to include in the index
Attribute |
Required |
Description |
name |
Yes |
The pattern or file name to include |
Exclude
<exclude>
The items to exclude from the index
Attribute |
Required |
Description |
name |
Yes |
The pattern of file name to exclude |
Example
The following specification indexes files with the extension of pdf but excludes any that contains the path secret.
<fileDocumentSpecification description="paths to where your documents live" tags="docs">
<identification displayName="documentation" />
<directories>
<directory path="c:\documentation">
<include name="*.pdf" />
<exclude name="secret" />
</directory>
<directory path="\\server\share\directory">
<include name="*.docx" />
<include name="*.xlsx" />
</directory>
</directories>
</fileDocumentSpecification>
The c:\documentation
directory will include pdfs
, and will exclude any pdfs
that have secret
in the path.
The \\server\share\directory
will index only files with the extension docx
or xlsx
.
Here is a table with example matches based on the above patterns:
Pattern |
Match |
Matches all files that contain the extension pdf Does match:
Does not match:
|
|
secret |
Matches all files that have secret in the path or filename Does match:
Does not match:
|
*.xlsx |
Matches all .xlsx files |
*.docx |
Matches all .docx files. |
If there are no explicit include or exclude nodes, all files will be indexed
See Also |
Next |