Links
dtSearch Text Retrieval Engine -- Java API
SearchJob Class
Classes | Legend | Members | Methods | Send Feedback

The SearchJob object performs searches with or without an index.

Class Hierarchy
public class SearchJob;
File

SearchJob.java

Remarks

To perform a search, make a SearchJob, use the properties to describe the task you want the engine to perform, and call the execute() method. After the search, use the getResults() method to obtain a SearchResults object with the results of the search. 

 

Errors

After executing a SearchJob, call getErrors() to check for any errors that may have occurred during the job. 

For search request syntax, see: 

Search Requests in Overviews 

For information on optimizing search speed, see: 

Optimizing Search Performance 

Group
Methods
Method 
Description 
Free memory allocated for SearchResults and the SearchFilter attached to this SearchJob. 
Execute the search, returning zero if the search succeeded, or a non-zero value if it failed. 
After a search, returns any errors that occurred during the search 
After a search, contains the number of files retrieved. 
After a search, contains the number of hits in all files retrieved. 
Returns the results of the search 
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 name of a file containing list of directories to search. 
In an unindexed search, the directory to search. To specify a directory and its subdirectories, add <+> (less than, plus, greater than) following the directory name. To specify more than one directory, write the directory list to a file and use DirListName. 
In an unindexed search, a file will be searched if it matches one of the IncludeFilters and does not match any of the ExcludeFilters. Each string can contain one or more filename filters, separated by spaces, to apply to files in the directories selected. (ExcludeFilters can be blank.) If a filename filter contains a space, put it in quotation marks. A filename filter that does not contain a backslash is compared to the name of each file. A filename filter that contains a backslash is compared to the fully-qualified pathname of each file. 
Specify a relevance weight for hits that occur in listed fields (example: Subject:10,HtmlTitle:20) 
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. 
Attach a SearchFilter to a search to limit the documents that can be retrieved 
If non-zero, the engine will match words that are close to but not identical to a search term. The higher the fuzziness, the more differences the engine will disregard in finding a match. Fuzziness can range from 0 to 10. 
In an unindexed search, a file will be searched if it matches one of the IncludeFilters and does not match any of the ExcludeFilters. Each string can contain one or more filename filters, separated by spaces, to apply to files in the directories selected. (ExcludeFilters can be blank.) If a filename filter contains a space, put it in quotation marks. A filename filter that does not contain a backslash is compared to the name of each file. A filename filter that contains a backslash is compared to the fully-qualified pathname of each file. 
Attach an IndexCache to a search to have the search re-use existing open indexes 

List of indexes to search. For each index, provide the full path to the index. If more than one index path is provided, separate the paths with spaces. If a path contains a space, use quotation marks around the path.
Example:  
Use this property to limit the number of retrieved documents returned. The engine will not stop searching after the limit is reached; instead, it will complete the search and collect the best matching files among all of the files retrieved. Therefore, this property will not affect the number of documents reported through the ReceiveFound callback. 
Treat search request as a natural language search rather than a structured search request. 
If true, the engine will perform a phonic search for each of the words in the search request. To enable phonic searching for a particular word, put a # in front of the word in the search request. 
Specifies the text to be found. See the "Search Requests" topic in the dtSearch Engine help file for query syntax. 
Deprecated -- use SearchResults.getResults() to obtain search results after a search. 
SearchFlags value with various search options 
The object that will receive status notification messages from the engine while the search is in progress.
The object should implement these two methods: int CheckForAbort(), and void ReceiveFound(String name). CheckForAbort should return 0 if the job is to continue, or 1 to abort the search. 
If true, the engine will match grammatical variations of words in the search request, using the stemming rules in STEMMING.DAT. To enable stemming for a particular word, put a ~ after the word in the search request. 
Enable synonym searching. 
Set to a non-zero value to force the search to halt after a specified time. 
Enable synonym searching. 
Enable synonym searching. 
Enable synonym searching. 
Legend
 
Method 
Links
You are here: Classes > SearchJob Class
Copyright (c) 1998-2008 dtSearch Corp. All rights reserved.