Documentation Center

Simple Search

This API call is the doorway into LiveContent's built-in search engine. This API call can run the Simple Search that may be filtered on TOC selection.

Example API call

/servlets3/wietmsd?id=1459154149530&book=s1000d_bike_41&collection=default&target=query&action=full_text&search=drivetrain&op1=&term2=&ignore_case=true&whole_words=false&toc_eid_list=661

Parameters

ParameterDescription
targetquery
actionfull_text
idA session ID that is valid for this collection and publication combination.
collectionThe name of the collection that the publication is registered in, such as default.
book The name of the publication, such as s1000d_bike_41.
searchSearched term, like drivetrain
ignore_caseIf true, search engine ignores case.
whole_wordsIf false, search engine looks for matches inside the words.
toc_eid_listOptional, toc_eid_list contains the ID of the TOC node in which to search, for example, toc_eid_list=661

Returns

On success

XML instance expressing the results and information about where those results lie within the TOC. The results of simple search are returned in a <TOPIC/> element. The search type is listed in a <SEARCH_TYPE/>, and the total number of results is contained in the <TOTAL/> element. A full text search returns <TITLE/> elements, each one a document. Within a result, there are extracts from the document that show where the search term was found, and the nearby context.

<RESULT>
	<STATUS>OK</STATUS>
	<TOPIC>
		<SEARCH_TYPE>Full Text</SEARCH_TYPE>
		<TOTAL>1</TOTAL>

		<XQLRESULTS>
			<SEARCH_DATA SEARCH_TYPE='full_text'>
				<SEARCH_RES_PARTITION>
					<TITLE EID='52' DOCTYPE='description' TOCEID='676' DOCUMENT_ID='S1000DBIKE-AAA-DA4-00-00-00-AA-041-A-A' TABLEONLY=''>Drivetrain - Drivetrain - Description of how it is made<CONTEXT-LIST>
							<FRAGMENT>
								<PATTERN>drivetrain</PATTERN> - description of how it is made</FRAGMENT>
							<FRAGMENT>
								<PATTERN>drivetrain</PATTERN> - description of how it is made</FRAGMENT>
							<FRAGMENT>
								<PATTERN>drivetrain</PATTERN> - description of how it is made</FRAGMENT>
							<FRAGMENT>
								<PATTERN>drivetrain</PATTERN>
							</FRAGMENT>
						</CONTEXT-LIST>
					</TITLE>
				</SEARCH_RES_PARTITION>
			</SEARCH_DATA>
		</XQLRESULTS>
	</TOPIC>
	<TOC_RESULTS>
		<TOCENTRY TOCEID="2" COUNTER="1"/>
		<TOCENTRY TOCEID="676" COUNTER="1"/>
		<TOCENTRY TOCEID="1" COUNTER="1"/>
		<TOCENTRY TOCEID="663" COUNTER="1"/>
		<TOCENTRY TOCEID="661" COUNTER="1"/>
	</TOC_RESULTS>
</RESULT>
On failure

Zero results are returned:

<RESULT>
	<STATUS>OK</STATUS>
	<TOPIC>
		<SEARCH_TYPE>Full Text</SEARCH_TYPE>
		<TOTAL>0</TOTAL>

		<XQLRESULTS>
			<SEARCH_DATA SEARCH_TYPE='full_text'>
				<SEARCH_RES_PARTITION/>
			</SEARCH_DATA>
		</XQLRESULTS>
	</TOPIC>
	<TOC_RESULTS/>
</RESULT>