FolderQuery
The XML structure used to specify a query on a query folder.
XML structure
<xs:schema id="ISHFolderQuery" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="ishfolderquery">
<xs:complexType>
<xs:all>
<xs:element ref="ishobjecttypes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="ishfields" minOccurs="1" maxOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="ishobjecttypes">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="ishobjecttype"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ishobjecttype">
<xs:complexType>
<xs:attribute name="ishtype" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ISHModule"/>
<xs:enumeration value="ISHMasterDoc"/>
<xs:enumeration value="ISHLibrary"/>
<xs:enumeration value="ISHTemplate"/>
<xs:enumeration value="ISHIllustration"/>
<xs:enumeration value="ISHPublication"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="ishfields">
<xs:complexType>
<!-- At least one filter must be present -->
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="ishfield"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="mandatoryText">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="ishfield">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="mandatoryText">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="level" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="logical"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ishvaluetype" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
<xs:enumeration value="value"/>
<xs:enumeration value="element"/>
<xs:enumeration value="id"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ishoperator" use="optional" default="equal">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="equal"/>
<xs:enumeration value="notequal"/>
<xs:enumeration value="in"/>
<xs:enumeration value="notin"/>
<xs:enumeration value="like"/>
<xs:enumeration value="greaterthan"/>
<xs:enumeration value="lessthan"/>
<xs:enumeration value="greaterthanorequal"/>
<xs:enumeration value="lessthanorequal"/>
<xs:enumeration value="between"/>
<xs:enumeration value="empty"/>
<xs:enumeration value="notempty"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
Operators
Search terms can have different operators. Depending on the data type of the field you can use different operators (see Behaviour of Metadata Filter Operators).
When creating or updating query folders the operators
morethan and morethanorequal are not supported anymore:
- The operator
morethanshould be replaced bygreaterthan - The operator
morethanorequalshould be replaced bygreaterthanorequal
Wildcard
When using the like operator, you can use the wildcard %. The % wildcard is replaced by an arbitrary number of characters during the search.
r%n searches for run, ran, reservation
The following example searches for all topics of the module (topic) type Concept.
<ishfolderquery>
<ishobjecttypes>
<ishobjecttype ishtype="ISHModule"/>
</ishobjecttypes>
<ishfields>
<ishfield name="FMODULETYPE" level="logical" ishoperator="equal">Concept</ishfield>
</ishfields>
</ishfolderquery>
The following example searches for all objects that are created between 01/01/2006 and 01/06/2006.
<ishfolderquery>
<ishfields>
<ishfield name="CREATED-ON"
level="logical"
ishoperator="between">01/01/2006, 01/06/2006</ishfield>
</ishfields>
</ishfolderquery>
Remarks
- Note that the metadata query can only filter on metadata fields of the logical level.
- Multiple values for a certain field can be specified in a comma-space separated list.
- Dates must be specified in the DD/MM/YYYY format.
- When no
ishobjecttypeis defined, all maps, topics, images, library (topics) and other (Word, PDF, ...) that match the filtering are returned.