Define a search to be performed.
File: dtsearch.h
Data Member |
Description |
---|---|
Type of search to perform. Set action.searchIndexes=true for an indexed search, and action.searchFiles=true for an unindexed search. | |
Set to a non-zero value to make the search automatically stop when this many documents were found. AutoStopLimit causes a search to halt automatically when a specified number of documents have been found. This provides a way to limit the resources consumed by searches that retrieve a very large number of documents. When the number of files retrieved reaches the autoStopLimit value, the search will immediately halt, and the code dtsErSearchLimitReached will be returned through the error handler for the search job. If the AutoStopLimit is 0, the search will not halt. | |
Additional boolean conditions that a document must meet to be retrieved in a search. | |
In an unindexed search, the contents of the dtsDataSource will be searched along with any files specified by filesToSearch. | |
Specify a relevance weight for hits that occur in listed fields (example: Subject:10,HtmlTitle:20) | |
Deprecated; use fileConditions2 | |
In an indexed search, filename, date, or size criteria that a file must meet to be retrieved. If both fileConditions and a request are provided, both must be matched. | |
Identifies files to search in an *unindexed search only | |
If non-zero, the engine will match words that are close to but not identical to a search term. Fuzziness can range from 1 to 10. The higher the fuzziness value, the more differences are tolerated when matching words, and the closer to the front of the word these differences can occur. | |
Optional handle to a dtsIndexCache to use for faster high-volume searching | |
Null-delimited string set identifying indexes to search. For each index, supply the full path to the index folder. | |
Obsolete -- use maxFilesToRetrieve2; | |
Limit the maximum size of search results to a specified number of files. | |
Specify the maximum length of a search request. | |
A per-search override to the dtsOptions.maxWordsToRetrieve setting | |
A search filter to hold the results of the search (possibly in addition to resultsHandle). If outputSearchFilterHandle is the handle of a valid dtsSearchFilter object, then every document retrieved in the search will also be selected in the search filter | |
Deprecated: use request2 | |
A null-terminated string containing the search request. See dtSearch User's Manual for information about search requests. The string can be up to 32,000 characters in length. | |
Obsolete | |
Handle of a dtsSearchResults to store the results of this search. To obtain a handle, declare a dtsSearchResults object and call its getHandle() method. After the search, you can use the dtsSearchResults object to access the results of the search. | |
Handle to a dtsSearchFilter to use to limit the documents that can be retrieved in this search. | |
Obsolete -- use searchFlags2 | |
SearchFlags values controlling various search options | |
Following a search, contains the number of files retrieved | |
Following a search, contains the number of hits retrieved in all files. | |
UnindexedSearchFlags values controlling an unindexed search |
Data Member |
Description |
---|---|
Type of search to perform. Set action.searchIndexes=true for an indexed search, and action.searchFiles=true for an unindexed search. | |
Set to a non-zero value to make the search automatically stop when this many documents were found. AutoStopLimit causes a search to halt automatically when a specified number of documents have been found. This provides a way to limit the resources consumed by searches that retrieve a very large number of documents. When the number of files retrieved reaches the autoStopLimit value, the search will immediately halt, and the code dtsErSearchLimitReached will be returned through the error handler for the search job. If the AutoStopLimit is 0, the search will not halt. | |
Additional boolean conditions that a document must meet to be retrieved in a search. | |
In an unindexed search, the contents of the dtsDataSource will be searched along with any files specified by filesToSearch. | |
Specify a relevance weight for hits that occur in listed fields (example: Subject:10,HtmlTitle:20) | |
Deprecated; use fileConditions2 | |
In an indexed search, filename, date, or size criteria that a file must meet to be retrieved. If both fileConditions and a request are provided, both must be matched. | |
Identifies files to search in an *unindexed search only | |
If non-zero, the engine will match words that are close to but not identical to a search term. Fuzziness can range from 1 to 10. The higher the fuzziness value, the more differences are tolerated when matching words, and the closer to the front of the word these differences can occur. | |
Optional handle to a dtsIndexCache to use for faster high-volume searching | |
Null-delimited string set identifying indexes to search. For each index, supply the full path to the index folder. | |
Obsolete -- use maxFilesToRetrieve2; | |
Limit the maximum size of search results to a specified number of files. | |
Specify the maximum length of a search request. | |
A per-search override to the dtsOptions.maxWordsToRetrieve setting | |
A search filter to hold the results of the search (possibly in addition to resultsHandle). If outputSearchFilterHandle is the handle of a valid dtsSearchFilter object, then every document retrieved in the search will also be selected in the search filter | |
Deprecated: use request2 | |
A null-terminated string containing the search request. See dtSearch User's Manual for information about search requests. The string can be up to 32,000 characters in length. | |
Obsolete | |
Handle of a dtsSearchResults to store the results of this search. To obtain a handle, declare a dtsSearchResults object and call its getHandle() method. After the search, you can use the dtsSearchResults object to access the results of the search. | |
Handle to a dtsSearchFilter to use to limit the documents that can be retrieved in this search. | |
Obsolete -- use searchFlags2 | |
SearchFlags values controlling various search options | |
Following a search, contains the number of files retrieved | |
Following a search, contains the number of hits retrieved in all files. | |
UnindexedSearchFlags values controlling an unindexed search |
A dtsSearchJob is used in the dtssDoSearchJob function call to define a search to be performed
There are three components to the search request that can be included in a dtsSearchJob:
(1) request2: The search request, which can be in the "boolean", "all words", or "anywords" syntax, depending on the value of searchFlags2.
(2) booleanConditions: A string in the boolean syntax expressing any conditions that must be satisfied in addition to whatever is in request2. This provides a way to add boolean conditions (such as field criteria) to a user-supplied query, which may be in the all words or any words syntax.
(3) fileConditions2: A string expressing conditions such as filename matches, file size matches, etc., that documents must satisfy. See FileConditions for the syntax.
Search results are obtained using a search results object. To set up a search job, declare a dtsSearchResults object to hold the results and then attach its handle to dtsSearchResults.resultsHandle. After the search, you can use the dtsSearchResults object to access the results of the search.
A search filter represents a set of documents that can be returned in a search. To limit a search to the documents in a search filter, set up a dtsSearchFilter object with the filter to use, and set dtsSearchResults.searchFilterHandle to the handled returned by dtsSearchFilter.getHandle(). Example:
To generate a search filter based on the results of a search, set the outputSearchFilterHandle to the handle of a dtsSearchFilter. Every document retrieved in the search will be selected in the output search filter. Note: maxFilesToRetrieve does not affect outputSearchFilter, which will include *every* item retrieved in the search. However, if autoStopLimit causes the search to terminate before it is complete, then only items found before the search stopped will be selected in the dtsSearchFilter.