Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6456

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add various search limits</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div>
 <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.udm-add-search-limit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">udm_add_search_limit</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5 &lt;= 5.0.5, PECL mnogosearch &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">udm_add_search_limit</span> &mdash; <span class="dc-title">Add various search limits</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.udm-add-search-limit-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>udm_add_search_limit</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$agent</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$var</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$val</code></span>
   )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>udm_add_search_limit()</strong></span> adds search restrictions.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.udm-add-search-limit-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">agent</code></em></span>
     <dd>

      <p class="para">
       A link to Agent, received after call to
        <span class="function"><a href="function.udm-alloc-agent.html" class="function">udm_alloc_agent()</a></span>.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">var</code></em></span>
     <dd>

      <p class="para">
       Defines the parameter, indicating limits. 
       Possible <em><code class="parameter">var</code></em> values:
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code>UDM_LIMIT_URL</code></strong> - defines document URL limitations to limit the search
          through subsection of the database. It supports SQL % and _  LIKE wildcards,
          where % matches any number of characters, even zero characters,
          and _ matches exactly one character. E.g. http://www.example.___/catalog
          may stand for http://www.example.com/catalog and http://www.example.net/catalog.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>UDM_LIMIT_TAG</code></strong> - defines site TAG limitations. In indexer-conf you can
          assign specific TAGs to various sites and parts of a site. Tags in
          mnoGoSearch 3.1.x are lines, that may contain metasymbols % and _.
          Metasymbols allow searching among groups of tags.
          E.g. there are links with tags ABCD and ABCE, and search restriction
          is by ABC_ - the search will be made among both of the tags.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>UDM_LIMIT_LANG</code></strong> - defines document language limitations.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>UDM_LIMIT_CAT</code></strong> - defines document category limitations. Categories are
          similar to tag feature, but nested. So you can have one category inside
          another and so on. You have to use two characters for each level. Use a
          hex number going from 0-F or a 36 base number going from 0-Z.
          Therefore a top-level category like &#039;Auto&#039; would be 01. If it has a
          subcategory like &#039;Ford&#039;, then it would be 01 (the parent category) and then
          &#039;Ford&#039; which we will give 01. Put those together and you get 0101. If &#039;Auto&#039;
          had another subcategory named &#039;VW&#039;, then it&#039;s id would be 01 because it
          belongs to the &#039;Ford&#039; category and then 02 because it&#039;s the next category.
          So it&#039;s id would be 0102. If VW had a sub category called &#039;Engine&#039; then it&#039;s
          id would start at 01 again and it would get the &#039;VW&#039; id 02 and &#039;Auto&#039; id of
          01, making it 010201. If you want to search for sites under that category
          then you pass it cat=010201 in the URL.
         </span>
        </li>
        <li class="listitem">
         <p class="para">
          <strong><code>UDM_LIMIT_DATE</code></strong> - defines limitation by date the document was modified.
         </p>
         <p class="para">
          Format of parameter value: a string with first character &lt; or &gt;,
          then with no space - date in unixtime format, for example:
         </p>
         <p class="para">
          <div class="example" id="example-4700">
           
           <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />udm_add_search_limit</span><span style="color: #007700">(</span><span style="color: #0000BB">$udm</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">UDM_LIMIT_DATE</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&amp;lt;908012006"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
           </div>

          </div>
         </p>
         <p class="para">
          If &gt; character is used, then the search will be restricted to those
          documents having a modification date greater than entered, if &lt;, then smaller.
         </p>
        </li>
       </ul>
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">val</code></em></span>
     <dd>

      <p class="para">
       Defines the value of the current parameter.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.udm-add-search-limit-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div>
 <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>