Search web service

From VYRE

Jump to: navigation, search

There is currently only one search web service which will perform a search across one or more stores and return the results in XML.

Contents

WSDL location

The location of the WSDL definition of this web service will be http://{unify_server}/vyre_webservices/services/SearchService?wsdl

preformSearch

The search web service can be used to perform an item search across any content stores on the Unify instance. It is possible to use all of the item related Search syntax. This uses one XML string, conforming to the DTD below, to generate the results. The results should look very similar to the XML generated by the Item search portlet.

Input

<!ELEMENT search-request (user-info,context-path,query,collections,lightweight?,load-linked-items?,load-linked-users?,pagination?)>
	<!ELEMENT user-info (realm-id,user-id)>
		<!ELEMENT realm-id (#PCDATA)>
		<!ELEMENT user-id (#PCDATA)>
	<!ELEMENT context-path (#PCDATA)>
	<!ELEMENT query (#PCDATA)>
	<!ELEMENT lightweight (#PCDATA)>
	<!ELEMENT load-linked-items (#PCDATA)>            <!-- Since 4.3.1.9 -->
	<!ELEMENT load-linked-users (#PCDATA)>            <!-- Since 4.3.1.9 -->
	<!ELEMENT pagination (page-no,items-per-page)>
	        <!ELEMENT page-no (#PCDATA)>
	        <!ELEMENT items-per-page (#PCDATA)>
	<!ELEMENT collections (id+)>
		<!ELEMENT id (#PCDATA)>
  • user-info: The realm and id of the user that the search should be run as. Any items that this user does not have view access to will not be included in the results.
  • context-path: The context path used for links in the XMl output.
  • query: The query that should be carried. This can contain any item related search syntax.
  • lightweight: A boolean indicating if items should be returned without their content and metadata.
  • load-linked-items: A boolean indicating whether linked items should be returned.
  • load-linked-users: A boolean indicating whether linked users should be returned.
  • pagination: The page number and the number of items per page.
  • collections: A list of the IDs of the content stores which should be searched.

Example Inputs

Example One

<?xml version="1.0" encoding="UTF-8"?>
<search-request>
  <user-info>
    <realm-id>initial</realm-id>
    <user-id>admin</user-id>
  </user-info>
  <context-path/>
  <query>+item:123</query>
  <collections>
    <id>32</id>
  </collections>
</search-request>

This will return the item with id 123 from store 32 (if it exists). The search will not be lightweight and all linked items and users will be returned.


Example Two

<?xml version="1.0" encoding="UTF-8"?>
<search-request>
  <user-info>
    <realm-id>initial</realm-id>
    <user-id>admin</user-id>
  </user-info>
  <context-path/>
  <query>+active:true</query>
  <collections>
    <id>63</id>
    <id>64</id>
  </collections>
  <load-linked-items>false</load-linked-items>
  <load-linked-users>false</load-linked-users>
</search-request>

This will return all active items from stores 63 and 64. The returned items will contain their content and metadata but linked items and users will not be returned.

Personal tools