The following parameters apply to the search method:
|
Parameter |
Type |
Description |
|---|---|---|
|
SID |
Integer |
Identifies the session retrieved from logging in. |
|
problem |
String |
Identifies the problem description to which you want to find solutions. |
|
resultSize |
Integer |
Identifies the number of documents for which you want to retrieve detailed information. The remaining documents have their IDs returned only. Detailed information for these documents can be accessed later using the getDocumentsByIDs() method. The default is 10. |
|
propertyList |
String |
Identifies the comma-separated list of database fields from which you want to retrieve information. The following fields are always returned, regardless of the propertyList parameter:
|
|
sortBy |
String |
Identifies the database field that you want to use for sorting the results. Multiple sort fields are not supported. The default is RELEVANCE. When id is a secondary sort, it always sorts the results. For a valid sort property, see the faq method. |
|
descending |
Boolean |
Identifies an indicator you can use for sorting the results in descending order. |
|
relatedCategories |
Boolean |
Returns a list of all related categories for the documents found. |
|
searchType |
Integer |
Type of search to perform:
|
|
matchType |
Integer |
Represents the type of match:
Note: If NLS is selected for the searchType parameter, then only the OR and AND matchTypes are valid. |
|
searchField |
Integer |
Represents the binary combination of fields in which to search:
For example, to search all fields, specify 15 (1+2+4+8). To search in Summary and Problem only, specify 6 (2+4). Note: The default is to search Problem. If you set the searchType parameter to NLS, the searchFields parameter is ignored because NLS searches can only search the Problem field. |
|
categoryPath |
String |
Limits the results of the search to a specific category or categories. You need to specify the full ID path to the category and separate multiple categories with commas. For example, 1-3-5, 1-4-8 to limit the search to categories 5 and 8 (and their sub-categories). |
|
whereClause |
String |
Use this to add your own ‘SQL where clause’ for filtering the results of the search. |
|
maxDocIds |
Integer |
Represents the maximum amount of document IDs allowed to be returned. For example, if you specify a resultSize of 10 and a maxDocIds of 50, if there are 100 matching documents in the database, then 10 have their detailed information retrieved, and 40 have just their IDs returned. The remaining 50 are not returned at all. The default is 100. |
Description
Searches for solutions to a problem. Documents are retrieved based on the problem that is passed. Any documents matching the description of the problem or a similar description, are returned. To improve performance, these methods only retrieve detailed information on a user-defined set of documents, which is controlled through the resultSize parameter. The rest of the documents return their ids only. Using this method, you can for example, set up a paging mechanism, where the user can click on ‘Top’, ‘Previous’, ‘Next’, and ‘Bottom’ links. When you need to retrieve the next set of information, you can use the getDocumentsByIDs() method.
Returns
A <UDSObjectList> node with the following sections:
<UDSObject> node from the <UDSObject> Node Description section of this chapter. There will be a <UDSObject> node with all the given properties for the first n documents that the method finds, where n equals the resultSize parameter. For example, if the resultSize parameter is 10, the maxDocIds parameter is 50, and the method finds 100 documents, then there are 10 <UDSObject> nodes with all the properties requested in the <Attributes> section and 40 <UDSObject> with only the ID property in the <Attributes> section. If you want to retrieve detailed <UDSObject> information for documents 11-20, you need to make a call to the getDocumentsByIDs() method and pass it those IDs.
If the getRelatedCategories parameter is set to True, the <UDSObjectList> node is included in the <Attributes> section for related categories. Each <INDEX_DOC_LINKS> node contains the relational ID of the category, as shown by the following example:
1-70
|
Copyright © 2013 CA.
All rights reserved.
|
|