Custom Filters
By using custom filters in harvesting requests, you can perform an advanced metadata search (filter) against the metadata records that will be harvested and limit the records that are retrieved. Examples of what to include in a custom filter can include:
- Specific keywords
- Bounding extent
- A given value in any metadata element
Filters can be used when harvesting from ESRI MS and Z39.50 repositories. For ESRI MS repositories, filters must be specified using ArcIMS XML (AXL) syntax. For Z39.50 repositories, filters must be specified using Prefix Query Format (PQF) syntax.
-
How to Configure ESRI MS Custom Filters
- In the "Harvest" tab, select the ESRI MS protocol radio option
- Click the "Edit AXL query..." button. The "Query" dialog opens
- Type in a valid filter in AXL syntax. Examples are shown below
- Click the OK button
ESRI MS custom filters use the grammar and syntax of the AXL language. The only portion of AXL that is required to define a custom filter is the <SEARCH_METADATA> tag. For more details on the AXL language, refer to the ArcXML Programmer's Reference Guide.
Examples of custom AXL filters
- Searching by any text using FULLTEXT:
<SEARCH_METADATA>
<FULLTEXT word="water"/>
</SEARCH_METADATA>
- Searching by name or owner of documents using DOCUMENTINFO:
<SEARCH_METADATA>
<DOCUMENTINFO name="GeoCommunicator" />
</SEARCH_METADATA>
- Searching by a particular tag value using TAGVALUE:
<SEARCH_METADATA>
<TAGTEXT tag="metadata/idinfo/keywords/theme/themekey" word="inlandWaters"/>
</SEARCH_METADATA>
OR
<SEARCH_METADATA>
<TAGVALUE tag="metadata/dataqual/lineage/srcinfo/srccite/citeinfo/pubdate" greaterthan="1990-01-01" />
</SEARCH_METADATA>
-
How to Configure Z39.50 Custom Filters
- In the "Harvest" tab, select the Z39.50 protocol radio option
- Click the "Edit PQF query..." button. The "Query" dialog opens
- Type in a valid filter in PQF syntax. Examples are shown below
- Click the OK button
Z39.50 custom filters use the grammar and syntax of the PQF language. For more details on the PQF language, there are a number of websites with online documentation. One example is http://www.indexdata.dk/yaz/doc/tools.tkl#PQF .
Examples of custom PQF filters
- Search for metadata that contains either the text "Water" or "Land":
@or "Water" "Land"
- 2. Search metadata by geographical coordination:
@attr 1=2060 @attr 2=7 @attr 4=201 "90 -180 -90 180"