dtSearch Text Retrieval Engine -- Java API
SearchResults Class Methods
SearchResults Class | Legend
Methods
Method 
Description 
Add a document to search results 
Remove all items from a search results list (this immediately frees memory needed for the items) 
Number of documents in the search results 
Document modified date 
Document modified date 
Provides access to detailed information about the retrieved document in the DocDetails string. For example, getDocDetailItem("UserField") would return the contents of a field named "UserField".
Predefined fields have an underscore (_) in front of the field name. User-defined fields stored in an index using the StoredFields property of an IndexJob follow the predefined fields and do not have an underscore prefix.
The predefined fields are:
  • _filename: full path name of the document.
  • _displayName: if non-blank, an alternative name to display for the document (for example, the title of an HTML document).
  • _title: the first 80 characters of the document.
  • _score:... more 
Returns the same document fields as getDocDetailMap(), but formatted as a single string. The string will contain a sequence of name = value pairs, delimited with carriage-return/newlines (chr$(13) + chr$(10)). 
Builds a java.util.Map from the field information associated with a document. The map will contain a sequence of (name, value) pairs of strings. Predefined fields have an underscore (_) in front of the field name. User-defined fields stored in an index using the StoredFields property of an IndexJob follow the predefined fields and do not have an underscore prefix.
The predefined fields are:
  • _filename: full path name of the document.
  • _displayName: if non-blank, an alternative name to display for the document (for example, the title of an HTML document).
  • _title: the first 80 characters of the document.
  • _score: in a... more 
If non-blank, an alternative name to display for the document (for example, the title of an HTML document). 
Number of hits found in the currently selected document. 
An integer array containing the word offsets of the hits found in the currently selected document. For information on using this data to highlight hits, see Highlighting Hits in the dtSearch Engine help file. 
Doc id of the currently selected document 
Name of the currently selected document 
Size of the currently selected document, in bytes 
TypeId identifying the file format of the currently selected document 
Generates a list of byte offsets of the hits in a file, for plain text files only.

After a search, the dtSearch Engine provides a list of hits for each file retrieved. This list provides the word offset of each word in a file that matches the search request. The easiest way to highlight hits in files retrieved with the dtSearch Engine is to use a FileConverter to convert the retrieved file to an HTML document with the hits highlighted.

For plain text files, the dtSearch Engine provides an alternative method. Instead of highlighting the hits directly, the Engine... more 
Generates a list of byte offsets of the hits in a file, for plain text files only. See getHitByteOffsets for details. 
Call GetNthDoc to select the nth document in the search results set and returns true if the document was selected. The item numbers range from 0 to getCount()-1. 
Returns the search request that generated these results 
Generates xml data used to highlight hits in Adobe Reader through a web browser interface. See Indexing and Searching Adobe Acrobat Files in the dtSearch Engine help file for more information. 
Use a SearchReportJob to generate a search report from some or all of the items listed in a SearchResults object. To create a SearchReportJob, call the SearchResults object's NewSearchReportJob method. Then set up the properties of the SearchReportJob to reflect the format of the report you want to create call the execute method of the SearchReportJob to create the report. 
Generates a stream of XML containing data in the search results list. 
Fills a SearchResults object with data from an XML stream generated by serializeAsXml 
Generates a stream of XML data for a particular item in the search results list 
Set the sort key for the currently-selected document. After calling setSortKey() for each document, call sort(Constants.dtsSortBySortKey) to sort search results by the specified keys. 
sort 
This is the overview for the sort method overload. 
UrlDecodeItem converts a string created by urlEncodeItem back into a search results item. 
urlEncodeItem creates a url-encoded string describing the currently-selected item in search results. This string can be inserted in an HTML link as part of the HREF. 
You are here: Classes > SearchResults Class
Copyright (c) 1998-2008 dtSearch Corp. All rights reserved.