Version: 2011.01.25

Krames StayWell External Web Service Documentation

GsaSearch Method

This method will return a small amount of meta-data for each content object that matches the supplied criteria.

Parameters: XmlRequest
	<GsaSearchRequest 
			SearchTerm="[string(s)]"
			Collections="[string(s)]" 
			ContentTypeLogicalOperator="[Include, Exclude]"
			ContentTypeIds="[delimited string list (ie  1,2,3,4,5,6)]"
			IncludeClientContent="[true, false]" 
			LanguageCode="[language code]" 
			StartIndex="[int]" 
			ResultsPerPage="[int]" />
		
  • SearchTerm is required. This can be either a single word or a phrase.
  • Collections is required. This is a case sensitive and needs to have one or more of the following collections:
    • ucr_documents
    • ucr_streaming_media
    • ucr_podcasts
  • ContentTypeLogicalOperator is optional. Include and Exclude are the expected parameters and determines how the search results are filtered by the supplied ContentTypeIds element. If this is not provided any values in the ContentTypeIds is ignored.
  • ContentTypeIds is optional, but required if ContentTypeLogicalOperator is specified. This will filter the results to only the content that contains ContentTypeId specified
  • IncludeClientContent is optional. If true and the client has the GSA client content service enabled, content that is crawled by the GSA will be included.
  • LanguageCode is optional.
  • StartIndex is optional. This index is zero based, meaning to get the first item pass in a Zero.
  • ResultsPerPage is optional. Number of results to show default is 25 with the max content per page is 100.
Sample Template

http://external.ws.staywell.com/[SiteName]/content.svc/GsaSearch?xmlRequest=<GsaSearchRequest SearchTerm="asthma" Collections="ucr_documents|ucr_streaming_media|ucr_podcasts" StartIndex="2" ContentTypeId="1" ContentId="A234" IncludeClientContent="true" ResultsPerPage="2" LanguageCode="en" />

Sample Result XML

Result could very with each call even if the identical call is made.

<GsaSearchResults>
    <HasSpellingSuggestion>false</HasSpellingSuggestion>
    <TotalResults>3650</TotalResults>
    <PreviousResultsUrl>%2fsearch%3fq%3dheart%26amp%3bnum%3d100%26amp%3bsite%3ducr_documents%26amp%3blr%3d%26amp%3bie%3dUTF-8%26amp%3boe%3dUTF-8%26amp%3boutput%3dxml_no_dtd%26amp%3bclient%3ddefault_frontend%26amp%3baccess%3dp%26amp%3bsort%3ddate%3aD%3aL%3ad1%26amp%3brequiredfields%3dswiSiteName%3a[SiteName]%26amp%3bstart%3d100%26amp%3bsa%3dN%26amp%3bfilter%3d0</NextResultsUrl>
    <NextResultsUrl>%2fsearch%3fq%3dheart%26amp%3bnum%3d100%26amp%3bsite%3ducr_documents%26amp%3blr%3d%26amp%3bie%3dUTF-8%26amp%3boe%3dUTF-8%26amp%3boutput%3dxml_no_dtd%26amp%3bclient%3ddefault_frontend%26amp%3baccess%3dp%26amp%3bsort%3ddate%3aD%3aL%3ad1%26amp%3brequiredfields%3dswiSiteName%3a[SiteName]%26amp%3bstart%3d100%26amp%3bsa%3dN%26amp%3bfilter%3d0</NextResultsUrl>
    <AdWords>
        <AdWord Title="What is Asthma?" Url="http://www.Asthma.com" />
    </AdWords>	
    <Results>
        <GsaResultItem Title="<b>Heart</b> Failure" Blurb="<b>Heart</b> Failure <b>Heart</b> failure, also called congestive <b>heart</b> failure, is a<br>
            condition in which the <b>heart</b> cannot pump enough blood <b>...</b>  " Language="en" ItemNumber="1" IsUcrContent="true" ContentTypeId="85" ContentId="P00206" IsCustom="false"/>
        <GsaResultItem Title="Glossary - Cardiovascular Disorders" Blurb="<b>...</b> Ablation also refers to a procedure that eliminates extra electrical pathways<br>
            within the <b>heart</b> that cause fast or irregular <b>heart</b> rhythms. <b>...</b>  " Language="en" ItemNumber="2" IsUcrContent="true" ContentTypeId="90" ContentId="P01793" IsCustom="false"/>
    </Results>
</GsaSearchResults>
    
  • AdWords are a collection of AdWords. These AdWords are showen based on terms that are matched in the SearchTerm(s) provided. For more information on how to enable AdWords contact your sales rep.