<abstract>This specification provides canonical documentation of the 'jabber:iq:search' namespace currently in use within the Jabber community.</abstract>
<remark>Clarified scope (searching of any information repository, not just user directories); added search and result examples to the extensibility section.</remark>
</revision>
<revision>
<version>1.1</version>
<date>2004-01-06</date>
<initials>psa</initials>
<remark>Added XML schema; added text regarding extensibility via Data Forms; added FORM_TYPE submission.</remark>
</revision>
<revision>
<version>1.0</version>
<date>2003-01-09</date>
<initials>psa</initials>
<remark>Updated status to Active per vote of the Jabber Council.</remark>
<p>This specification documents a protocol currently used to search information repositories on the Jabber network. To date, the jabber:iq:search protocol has been used mainly to search for people who have registered with user directories (e.g., the "Jabber User Directory" hosted at users.jabber.org). However, the jabber:iq:search protocol is not limited to user directories, and could be used to search other Jabber information repositories (such as chatroom directories) or even to provide a Jabber interface to conventional search engines.</p>
<p>The basic functionality is to query an information repository regarding the possible search fields, to send a search query, and to receive search results. Note well that there is currently no mechanism for paging through results or limiting the number of "hits", and that the allowable search fields are limited to those defined in the XML schema; however, extensibility MAY be provided via the &jep0004; protocol, as described below.</p>
<p>The fields defined in the 'jabber:iq:search' namespace are strictly limited to those specified in the schema. If a host needs to gather additional information, <strong>Data Forms</strong> SHOULD be used; a host MUST NOT add new fields to the 'jabber:iq:search' namespace. Support for extensibility via <strong>Data Forms</strong> is RECOMMENDED, but is not required for compliance with this JEP.</p>
<p>The extensibility mechanism for searching makes use of a hidden FORM_TYPE field for the purpose of standardizing field names within the form, as defined in &jep0068;. Implementations supporting this extensibility mechanism SHOULD support field standardization as well.</p>
<examplecaption='Entity Requests Search Fields from Service'><![CDATA[
<iqtype='get'
from='juliet@capulet.com/balcony'
to='characters.shakespeare.lit'
id='search3'
xml:lang='en'>
<queryxmlns='jabber:iq:search'/>
</iq>
]]></example>
<examplecaption='Host Returns Search Form to Entity'><![CDATA[
<iqtype='result'
from='characters.shakespeare.lit'
to='juliet@capulet.com/balcony'
id='search3'
xml:lang='en'>
<queryxmlns='jabber:iq:search'>
<instructions>
Use the enclosed form to search. If your Jabber client does not
<p>The following fields are reserved for use within jabber:x:data forms scoped by a FORM_TYPE of 'jabber:iq:search'; additional fields MAY be added via the Jabber Registrar's normal registration process but are outside the scope of this JEP.</p>