Contains methods that search indexed data in the DRE. Additional methods are used for agent and channel support.
remove – disconnects from the DRE.
setTracing – sets tracing on or off.
doQuery – sends a new natural language query to the search engine.
doNameSearchQuery – sends a new name search query to the DRE.
suggestMore – searches for documents like the named document.
getNextRecord – retrieves the next record (document) in the result set.
getDocContent – retrieves the contents of the current document or the contents of a document with the named ID. The option to store content must be selected when the document is indexed. Otherwise, there is no content.
getDocId – retrieves the ID of the current document.
getDocSummary – retrieves the summary of the current document.
getDocTitle – retrieves the title of the current document.
getDocUrl – retrieves the URL of the current document.
getDocWeight – retrieves the weight of the current document.
getTotalDocs – retrieves the total number of documents in the DRE.
getDatabaseNames – retrieves a list of databases indexed in the DRE.
getDocField – retrieves the specified field in the current document. Used to access user-defined fields of character data.
getLongDocField – retrieves the specified field in the current document. The field must contain long data.
The following methods are used exclusively to instantiate agents and channels:
addRoleForChannel – associates a role with a channel.
addRoleForUserAgent – associates a role with a user agent.
cleanupUserMemory – cleans up memory for a given user.
copyUserAgent – copies a user agent to another agent.
createAgent – creates a user agent or a subchannel in the database.
createChannel – creates a channel.
doQueryWithAgent – makes a query to the DRE using a user agent or subchannel.
editAgent – modifies the definition of a user agent or subchannel.
getCountOfChannels – gets the number of channels for a given set of roles and loads the user cache with the channels and subchannels to which the user has access.
getCountOfRolesForChannel – counts the number of roles for a given channel.
getCountOfRolesForUserAgent – counts the number of roles for a given user agent.
getCountOfSubChannels – gets the number of subchannels for a given channel.
getCountOfUserAgents – gets the number of user agents owned by a user and loads the user cache.
getCurrentSubChannelAge – returns age information for the current subchannel.
getCurrentSubChannelMaxDocs – returns the maximum number of documents for the current subchannel.
getCurrentSubChannelRelevance – returns the relevance for the current subchannel.
getCurrentSubChannelTrainingText – returns the training text for the current subchannel.
getCurrentUserAgentAge – gets information on the age of the current user agent.
getCurrentUserAgentMaxDocs – gets the maximum documents of the current user agent.
getCurrentUserAgentRelevance – gets the relevance or minimum weight of the current user agent.
getCurrentUserAgentTrainingText – gets the training text for the current user agent.
getNextChannelName – returns next channel from the list of channels loaded by getCountOfChannels method.
getNextRoleForChannel – returns next role for a current channel.
getNextRoleForCurrentUserAgent – gets the name of the next role of the current user agent.
getNextSubChannelName – returns the next subchannel name of the current channel.
getNextUserAgentName – gets the next user agent name in the list.
removeChannel – removes a channel.
removeRoleFromChannel – removes a role from a channel.
removeRoleFromUserAgent – removes a role from a user agent.
removeSubChannel – removes a subchannel.
removeUserAgent – removes a user agent.
renameAgent – renames a user agent or subchannel.
retrainSubChannelByResults – retrains a subchannel based on doc IDs.
retrainUserAgentByResults – retrains user agent based on doc IDs.
setupUserMemory – initializes user cache for a given user. setupUserMemory must be called before any agent or channel methods.
“Search and SearchHome Examples” later in this chapter for a code sample using the Search class.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |