Search fields in databases and document properties associated with files
To limit a search request to a particular field in a document, use the following syntax:
Example:
Field searches can be combined using boolean operators, like this:
The parenthesis are necessary to ensure that dtSearch interprets the search request correctly.
An alternative syntax for field searches is to add the field name and :: in front of each word, like this:
The alternative syntax can be used where the boolean syntax is not possible, such as in "all words" or "any words" searches and file conditions.
Some file formats such as XML support nesting of fields. Example:
In dtSearch, a search of a field includes any fields that are nested inside of the field, so the XML file above would be retrieved in a search for any of the following:
To specify a specific subfield of a field, use / to separate the field names, like this:
Put a / at the front of the field name to specify that it cannot be a sub-field of another field:
The second search request above would not match the XML example because, while it contains a "name" field, the name field is a sub-field of the record-field. A search for /name specifies a "name" field at the top of the field hierarchy.
Use // to specify any number of unspecified intervening fields, like this:
To search for text that is not in any field, search for //text contains (search request). The //text field name means "not in any field".
dtSearch removes punctuation from field names when indexing, with these exceptions: :&_+=.
Spaces are also removed. The hyphen is mapped to an underscore.
When searching, only searchable letters in field names are treated as significant.