File: udm-add-search-limit.xml

package info (click to toggle)
php-doc 20061001-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 45,764 kB
  • ctags: 1,611
  • sloc: xml: 502,485; php: 7,645; cpp: 500; makefile: 297; perl: 161; sh: 141; awk: 28
file content (124 lines) | stat: -rw-r--r-- 4,596 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/mnogosearch.xml, last change in rev 1.18 -->
 <refentry id="function.udm-add-search-limit">
  <refnamediv>
   <refname>udm_add_search_limit</refname>
   <refpurpose>Add various search limits</refpurpose>
  </refnamediv>
  <refsect1>
   <title>Description</title>
    <methodsynopsis>
     <type>bool</type><methodname>udm_add_search_limit</methodname>
     <methodparam><type>resource</type><parameter>agent</parameter></methodparam>
     <methodparam><type>int</type><parameter>var</parameter></methodparam>
     <methodparam><type>string</type><parameter>val</parameter></methodparam>
    </methodsynopsis>
   <para>
    <function>udm_add_search_limit</function> adds search restrictions.
    &return.success;
   </para>
   <para>
    <parameter>agent</parameter> - a link to Agent, received after call to 
    <function>udm_alloc_agent</function>.
   </para>
   <para>
    <parameter>var</parameter> - defines parameter, indicating limit.
   </para>
   <para>
    <parameter>val</parameter> - defines the value of the current parameter.
   </para>
   <para>
    Possible <parameter>var</parameter> values:
   </para>
   <itemizedlist>
    <listitem>
     <simpara>
      UDM_LIMIT_URL - 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.
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      UDM_LIMIT_TAG - 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.
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      UDM_LIMIT_LANG - defines document language limitations.
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      UDM_LIMIT_CAT - 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 'Auto' would be 01. If it has a
      subcategory like 'Ford', then it would be 01 (the parent category) and then
      'Ford' which we will give 01. Put those together and you get 0101. If 'Auto'
      had another subcategory named 'VW', then it's id would be 01 because it
      belongs to the 'Ford' category and then 02 because it's the next category.
      So it's id would be 0102. If VW had a sub category called 'Engine' then it's
      id would start at 01 again and it would get the 'VW' id 02 and 'Auto' 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.
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      UDM_LIMIT_DATE - defines limitation by date the document was modified.
     </simpara>
     <simpara>
      Format of parameter value: a string with first character &lt; or &gt;,
      then with no space - date in unixtime format, for example:
     </simpara>
     <para>
      <example>
       <title />
       <programlisting role="php">
<![CDATA[
<?php
      Udm_Add_Search_Limit($udm, UDM_LIMIT_DATE, "&lt;908012006");
?>
]]>
       </programlisting>
      </example>
     </para>
     <simpara>
      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.
     </simpara>
    </listitem>
   </itemizedlist>
  </refsect1>
 </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->