Overview of search request topics
A search request may include any combination of: (1) a full text search request, (2) restrictions based on the filename, modification date, or size, and (3) additional boolean restrictions, such as criteria based on the contents of fields in user documents. To accommodate these types of searching, dtSearch can combine three separate string values to form the complete search request.
The maximum total size of a search request in bytes is dtsMaxSearchRequestLen, which is defined in dtsearch.h.
The Request string usually comes from user input. Depending on the value of the search flags, it can use the boolean query syntax, or the "all words" or "any words" query syntax.
File conditions are usually restrictions based on the file modification date, name, or size. File conditions use the xfilter syntax described in the "File Conditions" help topic. File conditions can also be used to optimize searches for terms or field values, because matches on file conditions do not generate "hits" in the search results, which enables dtSearch to ignore word location information.
BooleanConditions are additional search criteria that are expressed in the boolean query syntax. BooleanConditions are useful when your application needs to combine a user-entered search request, which may be in the "all words" or "any words" syntax, with a boolean combination of field searches.
A document is retrieved in a search only if it matches the Request, FileConditions, and BooleanConditions. If any of these items is blank, it is ignored.
Search features such as fuzzy searching, stemming, wildcards, etc. can be used in any of the three search strings.
In the developer API, the Request, FileConditions, and BooleanConditions are properties of the SearchJob or DSearchJob (C++). In dtSearch Web, these three strings are HTML form variables.
A web-based application is set up to search a collection of PDF files. The application must be able to provide full-text search using the "any words" query syntax, as well as date range searching. Additionally, users can enter keywords to search for in the "Author" and "Subject" fields of the PDF files.
To implement this type of searching, the application would do the following:
For example, suppose a user is searching for a 2001 document on tax policy that concerns annuities and life insurance. The user fills out the search form as follows:
The application would set up a search as follows: