Links
dtSearch Text Retrieval Engine Programmer's Reference
ISearchJob Interface
dten600.idl | Interfaces | Legend | Members | Methods | Properties | Send Feedback
Class Hierarchy
[ object, uuid(697DF024-B24E-11D3-B57C-00105AA461D0), dual, helpstring("ISearchJob Interface"), pointer_default(unique) ]
interface ISearchJob : IDispatch;
File
Description

Performs searches with or without an index.

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.

Obtaining Search Results

You can request search results in an in-memory object, a listing file created after a search, or through callbacks sent through the StatusHandler object. 

To obtain search results in an in-memory object, sorted by relevance, set the MaxFilesToRetrieve property to the size of the search results object you want. After a search, use the Results property of the SearchJob to access search results, like this:

    Dim r as SearchResults
    Set r = searchJob.Results
    for i = 0 to r.Count-1
        r.GetNthDoc(i)
    next i

To obtain a text file listing the filenames of retrieved files, supply a filename in OutputListingName

To obtain an unsorted list of documents as they are retrieved, with hit counts, implement the ReceiveFound callback method in an object attached to the StatusHandler member. To obtain detailed information instead of a simple list of filenames, implement the ReceiveFoundWithDetail callback method. To obtain hit offsets for each document as it is retrieved, implement the ReceiveHits callback method. Because of the overhead associated with implementing callbacks in COM, this method is much slower than using SearchResults. 

Use the NewSearchJob method of the Server object to create a new SearchJob object.

Group
Methods
Method 
Description 
Aborts an indexing thread started by ExecuteInThread
Add an index path to the IndexesToSearch string. AddIndexToSearch takes care of adding quotation marks where needed (if an index path contains a space) and should be used instead of directly assigning to IndexesToSearch
Performs the search and returns 0 if the search is successful or -1 if an error occured. 
ExecuteInThread starts the search in a separate thread and returns immediately. 
Properties
Property 
Description 
AutoStopLimit causes a search to halt automatically when a specified number of documents have been found. 
Additional boolean conditions that a document must meet to be retrieved in a search. 
In an unindexed search, the name of a file containing a list of directories (or filenames) to search. 
In an unindexed search, the directory to search. 
After a search is done, the Errors property will contain a JobErrorInfo (IJobErrorInfo) object with any error messages generated during the indexing job. 
A file will be searched if it matches one of the IncludeFilters and does not match any of the ExcludeFilters. 
Specify a relevance weight for hits that occur in listed fields (example: Subject:10,HtmlTitle:20) 
File conditions that a document must meet to be retrieved in a search. 
After a search, contains the number of files 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. 
After a search, contains the number of hits in all files retrieved 
A file will be searched if it matches one of the IncludeFilters and does not match any of the ExcludeFilters
List of indexes to search. Deprecated: Use AddIndexToSearch 
Returns true if a searching thread started by ExecuteInThread has completed. 
ListingFlags specifying the type of listing to generate 
Limit the maximum size of search results to a specified number of files. 
If set to a filename, the name and hitcount of each file retrieved in the search will be written to this file. 
Specifies the text to be found. See Search Requests Overview 
Copies and returns the results of the search as a SearchResults object 
SearchFlags specifying the features to use in this search 
The object that will receive status notification messages from the engine while the search is in progress. 
If non-zero, the number of seconds to allow the search to run before automatically cancelling it. 
Legend
 
Property 
 
read only 
 
Method 
Links
You are here: COM Interface > Interfaces > ISearchJob Interface
Copyright (c) 1995-2008 dtSearch Corp. All rights reserved.