SEARCH_METADATA  Examples

Used in:  REQUEST  
Servers:  Metadata (Browse)  
Parent elements:  GET_METADATA   SEARCH_METADATA  

<SEARCH_METADATA Attribute Description Table

     foldermask ="1 - 15"
     maxresults ="integer"  [All records matching search criteria]
     operator ="and | or"  [and]
     sort ="name | relevance | contenttype | local_area | global_area"  [name]
     sort2 ="name | relevance | contenttype | local_area | global_area"
     startresult ="integer"  [0]
>

     (m) <DOCUMENTINFO... />  [And/Or]
     (m) <ENVELOPE... />  [And/Or]
     (m) <FULLTEXT... />  [And/Or]
     (m) <SEARCH_METADATA... />  [And/Or]
     (m) <SUBSET... />  [And/Or]
     (m) <TAGTEXT... />  [And/Or]
     (m) <TAGVALUE... />  [And/Or]
     <UPDATED... />  [And/Or]

</SEARCH_METADATA >
Bold: Attribute or child element is required.
(m):  Child element can be used multiple times.


Description:


Restrictions:


Notes:


Attribute Descriptions for SEARCH_METADATA:

Attribute Usage Back to Top
foldermask 1 Specifies folder types to be returned in the response. The value of foldermask is an integer storing the sum of one or more of the following values:
  • 1 = Root document
  • 2 = "Normal" folder
  • 4 = Document
  • 8 = Related Services folder
For example, use "4" to return documents only. Use "15" (1 + 2 + 4 + 8) to return all types of folders. The different values are:
  • 1 = Root document only (1)
  • 2 = "Normal" folders only (2)
  • 3 = Root document and "normal" folders (1 + 2)
  • 4 = Documents only (4)
  • 5 = Root document and documents (1 + 4)
  • 6 = "Normal" folders and documents (2 + 4)
  • 7 = Root document, "normal" folders, and documents (1 + 2 + 4)
  • 8 = Related Services folder only (8)
  • 9 = Root document and Related Services folder (1 + 8)
  • 10 = "Normal" folders and Related Services folder (2 + 8)
  • 11 = Root document, "normal" folders, and Related Services folder (1 + 2 + 8)
  • 12 = Documents and Related Services folder (4 + 8)
  • 13 = Root document, documents, and related Services folder (1 + 4 + 8)
  • 14 = "Normal" folders, documents, and related Services folder (2 + 4 + 8)
  • 15 = Root document, "normal" folders, documents, and Related Services folder (1 + 2 + 4 + 8)
maxresults 2 By default, all records meeting the search criteria are returned. This attribute limits the number of returned records to the maximum value assigned to the attribute.
operator 3 Used to define the operator for the SEARCH_METADATA query.
sort 4 Preference for ordering results. "Name" orders the results alphabetically. "Relevance" lists results from highest to lowest relevance. "Contenttype" sorts and groups results by content type. "Local_area" lists results by area in ascending order. "Global_area" lists results by area in descending order.
sort2 5 Sorts search results that were batched using startresult and maxresults. "Name" orders the results alphabetically. "Relevance" lists results from highest to lowest relevance. "Contenttype" sorts and groups results by content type. "Local_area" lists results by area in ascending order. "Global_area" lists results by area in descending order.
startresult 6 By default, all records meeting the search criteria are returned starting with record 0. This attribute allows a specified record as the start record.
 

Examples for SEARCH_METADATA:

Example 1: When searching by name or owner of documents using DOCUMENTINFO. Back to Top
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_METADATA>
      <SEARCH_METADATA>
        <DOCUMENTINFO name="World" />
      </SEARCH_METADATA>
    </GET_METADATA>
  </REQUEST>
</ARCXML>

Example 2: When using SUBSET. Back to Top
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_METADATA>
      <SEARCH_METADATA>
        <SUBSET type="children" docid="{F7DDF21-BC01-4C20-8AA5-243B33ED0B1E}" />
     </SEARCH_METADATA>
   </GET_METADATA>
  </REQUEST>
</ARCXML>

Example 3: When using TAGVALUE. Back to Top
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_METADATA>
      <SEARCH_METADATA operator="and" maxresults="10" startresult="0" >
        <TAGVALUE tag="metadata/idinfo/citation/citeinfo/pubdate" greaterthanorequalto="20001006" lessthanorequalto="20010104"/>
      </SEARCH_METADATA>
    </GET_METADATA>
  </REQUEST>
</ARCXML>

Example 4: When using ENVELOPE, TAGVALUE, FULLTEXT, and SEARCH_METADATA recursively with TAGTEXT. Back to Top
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_METADATA>
      <SEARCH_METADATA operator="and">
        <ENVELOPE minx="-176.98" miny="18.93" maxx="-66.97" maxy="71.35" spatialoperator="within" />
        <TAGVALUE tag="metadata/dataqual/lineage/srcinfo/srccite/citeinfo/pubdate" greaterthan="1990" />
        <FULLTEXT word="cities"/>
        <SEARCH_METADATA operator="or">
          <TAGTEXT tag="metadata/idinfo/citation/citeinfo/geoform" word="data"/>
          <TAGTEXT tag="metadata/idinfo/citation/citeinfo/geoform" word="digital"/>
        </SEARCH_METADATA>
      </SEARCH_METADATA>
    </GET_METADATA>
  </REQUEST>
</ARCXML>