SOAP API Search Service
Last Updated: 22 May 2017
The SOAP API Search Service asset manages the search functions of the SOAP Server including reindexing the system and making a search.
Please note that in order for the SOAP API Search Service to search content, indexing needs to be enabled on the relevant root nodes. For more information refer to the Search Manager chapter in the Search manual.
To add a SOAP API Search Service, go to Web Services -> SOAP API Search Service. For the API to work, it must be created under a SOAP Server within the Web Services folder, as shown in the figure to the right. The API will then be available to enable on the Details screen of the SOAP Server, as shown in the figure below.
You can configure the settings of the SOAP API Search Service on its associated asset screens. The majority of these screens are the same or similar to those for a Standard Page and are described in the Asset Screens manual. In this chapter we will describe the Details screen, which is different for a SOAP API Search Service.
Bookmarks to the headings on this page:
Details Screen
The Details screen allows you to configure the interface functions for the SOAP API Search Service. For more information about the Status, Future Status, Thumbnail and Details sections, refer to the Details Screen chapter in the Asset Screens manual.
Interface Settings
This section allows you to control which functions the SOAP API Search Service will be able to provide when enabled on a SOAP Server. The Interface Settings section of the Details screen is shown in the figure below.
In the Function List, select Enabled for the functions you want to make available on the API. For a full explanation of these functions, see the Operations section below.
Operations
The operations that are managed by the SOAP API Search Service are as follows:
See the sections below for more information on each of the operations available on this API.
BasicSearch
Elements - Parameter [Param Type] | Min Occurs | Max Occurs | Type | |
---|---|---|---|---|
BasicSearchSoapInput BasicSearch | AssetTypes [AssetTypes] Limit [string] Statuses [AssetStatus] RootIDs [string] ExcludeRootNodes [boolean] ResultFormat [string] | 0 1 0 0 0 0 | / 1 / / 1 1 | complex simple simple simple simple simple |
BasicSearchSoapOutput BasicSearchResponse | BasicSearchResult [string] | 0 | / | simple |
The BasicSearch operation will make a basic search of content within the system. This is a basic filtering of assets within the system based on the set parameters. The parameters available for this operation are as follows:
- AssetTypes: the asset types of the assets to search. Please note that this is a complexType parameter, requiring multiple elements. For more information, refer to the complexType Parameters Appendix in this manual.
- Limit: the number of search items to return. For example, 10 will return ten results. This parameter is mandatory.
- Statuses: the asset statuses of the assets to search. For example, enter 16 to search Live assets.
- RootIDs: the asset ID of the root nodes for the search, determining which section of the system to search.
- ExcludeRootNodes: indicates whether or not the selected root nodes should be excluded from the search. The value for this parameter should be either TRUE or FALSE (or 1 or 0). The default value for this parameter is FALSE.
- ResultFormat: keyword replacements determining the format of the search results. For example, %asset_name% would display the search results by the asset's name.
Example Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:BasicSearch>
<AssetTypes>
<AssetType>page</AssetType>
<Inherit>1</Inherit>
</AssetTypes>
<AssetTypes>
<AssetType>file</AssetType>
<Inherit>1</Inherit>
</AssetTypes>
<Limit>100</Limit>
<Statuses>16</Statuses>
<Statuses>2</Statuses>
<RootIDs>100</RootIDs>
<RootIDs>200</RootIDs>
<ExcludeRootNodes>TRUE</ExcludeRootNodes>
<ResultFormat>%asset_short_name%</ResultFormat>
</ns1:BasicSearch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:BasicSearchResponse>
<BasicSearchResult>Home</BasicSearchResult>
<BasicSearchResult>About Us</BasicSearchResult>
<BasicSearchResult>Contact</BasicSearchResult>
<BasicSearchResult>News</BasicSearchResult>
</ns1:BasicSearchResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
AdvancedSearch
Elements - Parameter [Param Type] | Min Occurs | Max Occurs | Type | |
---|---|---|---|---|
AdvancedSearchSoapInput AdvancedSearch | AssetTypes [AssetTypes] ExcludeWords [string] FieldLogic [string] Limit [string] ResultFormat [string] RootIDs [string] RootLogic [SearchLogicValue] ExcludeRootNodes [boolean] Statuses [AssetStatus] SearchFields [SearchField] | 0 0 0 1 0 0 0 0 0 0 | / / 1 1 1 / 1 1 / / | complex simple simple simple simple simple simple simple simple complex |
AdvancedSearchSoapOutput AdvancedSearchResponse | AdvancedSearchResult [AdvancedResult] | 0 | / | complex |
The AdvancedSearch operation will make an advanced search of content within the system, providing you with the various options, such as specifying search terms, word terms and data sources for the search. The parameters available for this operation are as follows:
- AssetTypes: the asset types of the assets to search. Please note that this is a complexType parameter, requiring multiple elements. For more information, refer to the complexType Parameters Appendix in this manual.
- ExcludeWords: words to exclude from the search results.
- FieldLogic: the logic value for the search fields. This will determine what field criteria must be met for the search results. The value for this parameter can be either AND (all fields must be met) or OR (only one field must be met). The default value for this parameter is AND.
- Limit: the number of search items to return. For example, 10 will return ten results. This parameter is mandatory.
- ResultFormat: keyword replacements determining the format of the search results.
- RootIDs: the asset ID of the root nodes for the search, determining which section of the system to search.
- RootLogic: the search logic value of the selected root nodes. This will determine what root node criteria must be met for the search results. The value for this parameter can be either AND (all root nodes must be met) or OR (only one root node must be met). The default value for this parameter is AND.
- ExcludeRootNodes: indicates whether or not the selected root nodes should be excluded from the search. The value for this parameter should be either TRUE or FALSE (or 1 or 0).
- Statuses: the asset statuses of the assets to search. For example, enter 16 to search Live assets.
- SearchFields: the search field for the search. This will determine the search terms, word logic and data sources for the search. Please note that this is a complexType parameter, requiring multiple elements. For more information, refer to the complexType Parameters Appendix in this manual.
Example Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:AdvancedSearch>
<AssetTypes>
<AssetType>page</AssetType>
<Inherit>1</Inherit>
</AssetTypes>
<ExcludeWords>more</ExcludeWords>
<ExcludeWords>printable</ExcludeWords>
<FieldLogic>AND</FieldLogic>
<Limit>50</Limit>
<ResultFormat>%asset_short_name%</ResultFormat>
<RootIDs>100</RootIDs>
<RootIDs>200</RootIDs>
<RootLogic>OR</RootLogic>
<ExcludeRootNodes>FALSE</ExcludeRootNodes>
<Statuses>16</Statuses>
<SearchFields>
<SearchTerm>search_term</SearchTerm>
<WordLogic>OR</WordLogic>
<DataSources>
<FieldType>Metadata</FieldType>
<MetadataOption>
<MetadataFieldID>150</MetadataFieldID>
</MetadataOption>
</DataSources>
<DataSources>
<FieldType>Attribute</FieldType>
<AttributeOption>
<AssetType>page_standard</AssetType>
<AttributeID>884</AttributeID>
</AttributeOption>
</DataSources>
<DataSources>
<FieldType>Standard</FieldType>
<StandardOption>
<FieldName>name</FieldName>
</StandardOption>
</DataSources>
<DataSources>
<FieldType>IncludeAll</FieldType>
<StandardOption />
</DataSources> </SearchFields>
</ns1:AdvancedSearch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:AdvancedSearchResponse>
<AdvancedSearchResult>
<AssetDisplay>Home</AssetDisplay>
<SearchScore>1</SearchScore>
<Source>metadata:150</Source>
</AdvancedSearchResult>
<AdvancedSearchResult>
<AssetDisplay>About Us</AssetDisplay>
<SearchScore>1</SearchScore>
<Source>__name__</Source>
</AdvancedSearchResult>
<AdvancedSearchResult>
<AssetDisplay>News</AssetDisplay>
<SearchScore>1</SearchScore>
<Source>attr:short_name</Source>
<AdvancedSearchResult>
</ns1:AdvancedSearchResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ReIndex
Elements - Parameter [Param Type] | Min Occurs | Max Occurs | Type | |
---|---|---|---|---|
ReIndexSoapInput ReIndex | Asset ID [string] IndexComponents [IndexComponent] | 1 0 | 1 1 | simple simple |
ReIndexSoapOutput ReIndexResponse | ReIndexResult [boolean] | 0 | / | simple |
The ReIndex operation will reindex components of a specified asset. The parameters available for this operation are as follows:
- AssetID: the asset ID of the asset to reindex. This parameter is mandatory.
- IndexComponents: the components of the asset to reindex. This allows you to define specific components to reindex. The value for this parameter can be asset, metadata or all. The default value for this parameter is all.
Example Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:ReIndex>
<AssetID>100</AssetID>
<IndexComponents>all</IndexComponents>
</ns1:ReIndex>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
<SOAP-ENV:Body>
<ns1:ReIndexResponse>
<ReIndexResult>true</ReIndexResult>
</ns1:ReIndexResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>