Changes between Version 70 and Version 71 of Discovery/DiscoveryWebServiceMEDIN


Ignore:
Timestamp:
03/03/10 15:38:06 (9 years ago)
Author:
sdonegan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Discovery/DiscoveryWebServiceMEDIN

    v70 v71  
    9696 
    9797===== !TermSearch ===== 
    98 !TermSearch is a full-text search invoked on a specific target field in the discovery database. Child elements <!Term> and <!TermTarget> should be populated as follows: 
    99   * <Term> : text term to search for. Whitespace separates component words, which are searched in "OR" combination unless the "+" symbol is used between them, in which case the words joined in this way are searched in "AND" combination. 
     98!TermSearch is a full-text search invoked on a specific target field in the discovery database. !TermSearch elements must have an attribute named "id" with an integer value representing the order to be considered in complex multi termed searches, usually though "id" can be considered as the number of the !TermSearch element.  If more than one !TermSearch element is used then all subsequent !TermSearch elements (excluding the first) must also have an "operator" attribute describing the relationship between the !TermSearch element in question with preceding !TermSearchs (the order of these is given by the "id" attribute).  Acceptable values for the operator attribute are "AND", "OR" and "NOT". 
     99 
     100Child elements <!Term> and <!TermTarget> should be populated as follows: 
     101  * <Term> : text term to search for. Whitespace separates component words, which are searched in "OR" combination unless the "+" symbol is used between them, in which case the words joined in this way are searched in "AND" combination.  The text "AND" may also be subsituted for "+". 
    100102  * <!TermTarget> : target field name taken from the [#TermTargetList TermTargetList] list of valid term targets. 
    101 If multiple <TermSearch> elements are present (e.g. to search different <!TermTarget>s) ), these are interpreted as successive term searches to be combined in "AND" combination. For example: 
    102  
    103 {{{ 
    104   <TermSearch> 
    105     <Term>snow + rain</Term> 
    106     <TermTarget>Abstract</TermTarget> 
    107   </TermSearch> 
    108   <TermSearch> 
    109     <Term>lawrence</Term> 
    110     <TermTarget>Author</TermTarget> 
    111   </TermSearch> 
    112 }}} 
     103 
     104An example of a single !TermSearch targeted at the !FullText term target: 
     105 
     106{{{ 
     107  <m:TermSearch> 
     108    <m:Term>snow + rain</m:Term> 
     109    <m:TermTarget>FullText</m:TermTarget> 
     110  </m:TermSearch> 
     111}}} 
     112 
     113means 
     114{{{ 
     115  Search for records where: 
     116    Full text contains "snow" AND "rain" 
     117}}} 
     118 
     119We can extend the above example by adding an additional <!TermSearch> targeted at the Authors field: 
     120 
     121{{{ 
     122 
     123  <m:TermSearch id="1"> 
     124    <m:Term>snow + rain</m:Term> 
     125    <m:TermTarget>Abstract</m:TermTarget> 
     126  </m:TermSearch> 
     127  <m:TermSearch operator="AND" id="2"> 
     128    <m:Term>Lawrence</m:Term> 
     129    <m:TermTarget>Authors</m:TermTarget> 
     130  </m:TermSearch> 
     131}}}  
    113132 
    114133means 
     
    118137  AND 
    119138    author contains "lawrence" 
    120 }}} 
    121 If we were to extend the example by adding an additional <!TermSearch> '''also''' targetted at the abstract, this would be combined in OR combination with the first <!TermSearch> for '''that''' target (abstract), i.e. 
    122  
    123 {{{ 
    124   <TermSearch> 
    125     <Term>snow + rain</Term> 
    126     <TermTarget>Abstract</TermTarget> 
    127   </TermSearch> 
    128   <TermSearch> 
    129     <Term>lawrence</Term> 
    130     <TermTarget>Author</TermTarget> 
    131   </TermSearch> 
    132   <TermSearch> 
    133     <Term>hail</Term> 
    134     <TermTarget>Abstract</TermTarget> 
    135   </TermSearch> 
    136 }}} 
    137   
     139 
     140}}} 
     141 
     142We can add further !TermSearches to extend this query: 
     143{{{ 
     144 
     145  <m:TermSearch id="1"> 
     146    <m:Term>snow + rain</m:Term> 
     147    <m:TermTarget>Abstract</m:TermTarget> 
     148  </m:TermSearch> 
     149  <m:TermSearch operator="AND" id="2"> 
     150    <m:Term>Lawrence</m:Term> 
     151    <m:TermTarget>Authors</m:TermTarget> 
     152  </m:TermSearch> 
     153  <m:TermSearch operator="OR" id="3"> 
     154    <m:Term>hail</m:Term> 
     155    <m:TermTarget>Abstract</m:TermTarget> 
     156  </m:TermSearch> 
     157}}} 
     158 
    138159This would be interpreted to mean: 
    139160{{{ 
    140   Search for records where: 
     161Search for records where: 
    141162    abstract contains ("snow" AND "rain") OR "hail" 
    142163  AND 
    143164    author contains "lawrence" 
    144165}}} 
     166 
     167..and so on. 
    145168 
    146169===== Spatial searching : <!SpatialOperator> and <!BoundingBox> =====