Categorical Search
This API call is the doorway into LiveContent's built-in search engine. This API call can run the Categorical Search. This search may be filtered on TOC selection.
Example API call
/servlets3/wietmsd?id=1458924067614&book=s1000d_bike_41&collection=default&uniqid=1458924066930&target=query&action=topic_title:&search=attributed&op1=&term2=&ignore_case=true&whole_words=false&toc_eid_list=22
Parameters
| Parameter | Description |
|---|---|
target | query |
action | Examples of categorical scope identifiers: sys_title (TOC title search), topic_title (Topic Titles search), figure_title (Figure Titles search), part_pnr (Part Numbers search), part_dfp (Part Nomenclature search), fault_code (Fault Code search), dmc_code (Data module search) |
id | A session ID that is valid for this collection and publication combination. |
collection | The name of the collection that the publication is registered in, such as default. |
book | The name of the publication, such as s1000d_bike_41. |
search | Searched term, like attributed |
ignore_case | If true, search engine ignores case. |
whole_words | If false, search engine looks for matches inside the words, not only including whole words |
toc_eid_list | Optional, toc_eid_list contains the ID of the TOC node in which to search, for example, toc_eid_list=22 |
uniqid | To prevent browser-side caching of data, especially with AJAX requests, it is important to make a URL unique. The most effective technique to accomplish this is to include a time parameter that is based on the time at which the call is made. |
Returns
- On success
-
XML instance expressing the results and information about where those results lie within the TOC. The results of categorical 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 categorical 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>null</SEARCH_TYPE> <TOTAL>1</TOTAL> <XQLRESULTS> <SEARCH_DATA SEARCH_TYPE="topic_title"> <SEARCH_RES_PARTITION> <TITLE REFDOCID="6" TOC_PARENT_EID="29" TOCEID="42" TOPIC_REFID="">Bicycle - Description attributed to crew</TITLE> </SEARCH_RES_PARTITION> </SEARCH_DATA> </XQLRESULTS> </TOPIC> <TOC_RESULTS> <TOCENTRY TOCEID="4" COUNTER="1"/> <TOCENTRY TOCEID="2" COUNTER="1"/> <TOCENTRY TOCEID="1" COUNTER="1"/> <TOCENTRY TOCEID="29" COUNTER="1"/> <TOCENTRY TOCEID="42" COUNTER="1"/> </TOC_RESULTS> </RESULT> - On failure
-
Zero results are returned.
<RESULT> <STATUS>OK</STATUS> <TOPIC> <SEARCH_TYPE>null</SEARCH_TYPE> <TOTAL>0</TOTAL> <XQLRESULTS> <SEARCH_DATA SEARCH_TYPE="topic_title"> <SEARCH_RES_PARTITION/> </SEARCH_DATA> </XQLRESULTS> </TOPIC> <TOC_RESULTS/> </RESULT>