SOAP API search service

The SOAP API search service setup

The SOAP API search service asset manages the search functions of the SOAP server, including reindexing the system and doing a search.

Note

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 documentation in the search documentation.

To add a SOAP API search service, go to Web services  SOAP API search service

The SOAP API search service available on the SOAP server

You can configure the settings of the SOAP API search service on its associated asset screens. The majority of these screens are similar to those for a standard page. They are described in the Asset screens documentation. This documentation will describe the Details screen, which is different for a SOAP API search service.

Details screen

The Details screen allows you to configure the interface functions for the SOAP API search service. Read the Asset screens documentation for more information about the Status, Future status, Thumbnail, and Details sections.

Interface settings

This section allows you to control which functions the SOAP API search service will provide when enabled on a SOAP server. The interface settings section of the Details screen is shown in the figure.

The interface settings of the SOAP API search service

In the function list, select enabled for the functions you want to make available on the API.

Operations

The operations that are managed by the SOAP API search service are as follows:

BasicSearch

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:

BasicSearchSoapInput (BasicSearch)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetTypes [AssetTypes]

The asset types of the assets to search. +This is a complexType parameter, requiring multiple elements.

0

/

complex

Limit [string]

The number of search items to return. For example, 10 will return ten results. This parameter is mandatory.

1

1

simple

Statuses [AssetStatus]

The asset statuses of the assets to search. For example, enter 16 to search Live assets.

0

/

simple

RootIDs [string]

The asset ID of the root nodes for the search, determining which section of the system to search.

0

/

simple

ExcludeRootNodes [boolean]

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.

0

1

simple

ResultFormat [string]

Keyword replacements determining the format of the search results. For example, %asset_name% would display the search results by the asset’s name.

0

1

simple

Example 1. BasicSearch 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>

BasicSearchSoapOutput (BasicSearchResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

BasicSearchResult [string]

0

/

simple

Example 2. BasicSearch 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

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:

AdvancedSearchSoapInput (AdvancedSearch)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetTypes [AssetTypes]

The asset types of the assets to search. This is a complexType parameter, requiring multiple elements.

0

/

complex

ExcludeWords [string]

Words to exclude from the search results.

0

/

simple

FieldLogic [string]

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.

0

1

simple

Limit [string]

The number of search items to return. For example, 10 will return ten results. This parameter is mandatory.

1

1

simple

ResultFormat [string]

Keyword replacements determining the format of the search results.

0

1

simple

RootIDs [string]

The asset ID of the root nodes for the search, determining which section of the system to search.

0

/

simple

RootLogic [SearchLogicValue]

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.

0

1

simple

ExcludeRootNodes [boolean]

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).

0

1

simple

Statuses [AssetStatus]

The asset statuses of the assets to search. For example, enter 16 to search Live assets.

0

/

simple

SearchFields [SearchField]

The search field for the search. This will determine the search terms, word logic and data sources for the search. This is a complexType parameter, requiring multiple elements.

0

/

complex

Example 3. AdvancedSearch 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>

AdvancedSearchSoapOutput (AdvancedSearchResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

AdvancedSearchResult [AdvancedResult]

0

/

complex

Example 4. AdvancedSearch 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

The ReIndex operation will reindex components of a specified asset. The parameters available for this operation are as follows:

ReIndexSoapInput (ReIndex)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

Asset ID [string]

The asset ID of the asset to reindex. This parameter is mandatory.

1

1

simple

IndexComponents [IndexComponent]

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.

0

1

simple

Example 5. ReIndex 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>

ReIndexSoapOutput (ReIndexResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

ReIndexResult [boolean]

0

/

simple

Example 6. ReIndex 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>

© 2015- Squiz Pty Ltd