Documentation Center

Advanced search

This API call is the doorway into LiveContent's built-in search engine. This API call can run the Advanced Search using different Boolean operators. This search may be filtered on TOC selection.

Example API call

/servlets3/wietmsd?id=1458924067614&book=s1000d_bike_41&collection=default&target=query&action=full_text&search=description&op1=and&term2=made&ignore_case=false&whole_words=true&toc_eid_list=4

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 description
term2Second searched term, like made
op1A boolean operator; one of and, or, andnot, or near. This boolean operator will be used to union or reduce the result set from the searches run using the search term and the term2 parameter.
ignore_caseIf false, search engine does not ignore case.
whole_wordsSet to true, instructing the search engine to only match on whole words. If set to false, search engine looks for matches inside the words.
toc_eid_listOptional; toc_eid_list contains the EID of the TOC node in which to search, for example, toc_eid_list=4

Returns

On success

XML instance expressing the results and information about where those results lie within the TOC. The results of advanced 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>3</TOTAL>
		<XQLRESULTS>
			<SEARCH_DATA SEARCH_TYPE='full_text'>
				<SEARCH_RES_PARTITION>
					<TITLE EID='4' DOCTYPE='description' TOCEID='19' DOCUMENT_ID='S1000DBIKE-AAA-D00-00-00-00-AA-041-A-A' TABLEONLY=''>Bicycle - Bicycle - Description of how it is made<CONTEXT-LIST>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of how it is <PATTERN>made</PATTERN>
							</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of how it is <PATTERN>made</PATTERN>
							</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of how it is <PATTERN>made</PATTERN>
							</FRAGMENT>
							<FRAGMENT>
								<PATTERN>description</PATTERN> of how it is <PATTERN>made</PATTERN>
							</FRAGMENT>
						</CONTEXT-LIST>
					</TITLE>
					<TITLE EID='5' DOCTYPE='description' TOCEID='26' DOCUMENT_ID='S1000DBIKE-AAA-D00-00-00-00-AA-042-A-A' TABLEONLY=''>Bicycle - Bicycle - Description of function<CONTEXT-LIST>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of function</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of function</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> of function</FRAGMENT>
							<FRAGMENT>
								<PATTERN>description</PATTERN> of function</FRAGMENT>
						</CONTEXT-LIST>
					</TITLE>
					<TITLE EID='6' DOCTYPE='crew' TOCEID='42' DOCUMENT_ID='S1000DBIKE-AAA-D00-00-00-00-AA-043-A-A' TABLEONLY=''>Bicycle - Bicycle - Description attributed to crew<CONTEXT-LIST>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> attributed to crew</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> attributed to crew</FRAGMENT>
							<FRAGMENT>bicycle - <PATTERN>description</PATTERN> attributed to crew</FRAGMENT>
							<FRAGMENT>
								<PATTERN>description</PATTERN> attributed to crew</FRAGMENT>
						</CONTEXT-LIST>
					</TITLE>
				</SEARCH_RES_PARTITION>
			</SEARCH_DATA>
		</XQLRESULTS>
	</TOPIC>
	<TOC_RESULTS>
		<TOCENTRY TOCEID="29" COUNTER="1"/>
		<TOCENTRY TOCEID="26" COUNTER="1"/>
		<TOCENTRY TOCEID="22" COUNTER="1"/>
		<TOCENTRY TOCEID="19" COUNTER="1"/>
		<TOCENTRY TOCEID="6" COUNTER="1"/>
		<TOCENTRY TOCEID="42" COUNTER="1"/>
		<TOCENTRY TOCEID="4" COUNTER="3"/>
		<TOCENTRY TOCEID="2" COUNTER="3"/>
		<TOCENTRY TOCEID="1" COUNTER="3"/>
	</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>