Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2776

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>udm_set_agent_param</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="mnoGoSearch Functions"
HREF="ref.mnogo.html"><LINK
REL="PREVIOUS"
TITLE="udm_open_stored"
HREF="function.udm-open-stored.html"><LINK
REL="NEXT"
TITLE="funciones mSQL"
HREF="ref.msql.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.udm-open-stored.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="ref.msql.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.udm-set-agent-param"
></A
>udm_set_agent_param</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN46526"
></A
><P
>    (PHP 4 &#62;= 4.0.5)</P
>udm_set_agent_param&nbsp;--&nbsp;Set mnoGoSearch agent session parameters</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN46529"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>udm_set_agent_param</B
> ( int agent, int var, string val)<BR
></BR
><P
>&#13;    <B
CLASS="function"
>udm_set_agent_param()</B
> returns <TT
CLASS="constant"
><B
>TRUE</B
></TT
> on success,
    <TT
CLASS="constant"
><B
>FALSE</B
></TT
> on error.  Defines mnoGoSearch session parameters.
   </P
><P
>&#13;    The following parameters and their values are available:
   </P
><P
></P
><UL
><LI
><P
>&#13;      UDM_PARAM_PAGE_NUM - used to choose search results page number (results 
      are returned by pages beginning from 0, with UDM_PARAM_PAGE_SIZE results per page).
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_PAGE_SIZE - number of search results displayed on one page.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_SEARCH_MODE - search mode. The following values available: UDM_MODE_ALL -
      search for all words; UDM_MODE_ANY - search for any word; UDM_MODE_PHRASE - 
      phrase search; UDM_MODE_BOOL - boolean search. See <A
HREF="function.udm-find.html"
><B
CLASS="function"
>udm_find()</B
></A
>
      for details on boolean search.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_CACHE_MODE - turns on or off search result cache mode. 
      When enabled, the search engine will store
      search results to disk. In case a similar search is performed later, 
      the engine will take results from the cache for faster performance.
      Available values: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_TRACK_MODE - turns on or off trackquery mode. Since 
      version 3.1.2 mnoGoSearch has a query tracking support.
      Note that tracking is implemented in SQL version only and not available
       in built-in database.
      To use tracking, you have to create tables for tracking support. 
      For MySQL, use create/mysql/track.txt.
      When doing a search, front-end uses those tables to store query words,
      a number of found documents and current UNIX timestamp in seconds.
      Available values: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_PHRASE_MODE - defines whether index database using phrases 
      ("phrase" parameter in indexer.conf).
      Possible values: UDM_PHRASE_ENABLED and UDM_PHRASE_DISABLED.
      Please note, that if phrase search is enabled (UDM_PHRASE_ENABLED),
      it is still possible to do search in any mode (ANY, ALL, BOOL or PHRASE).
      In 3.1.10 version of mnoGoSearch phrase search is supported only in sql 
      and built-in database modes,
      while beginning with 3.1.11 phrases are supported in cachemode as well.
     </P
><P
>&#13;      Examples of phrase search:
     </P
><P
>&#13;      "Arizona desert" - This query returns all indexed documents that contain 
      "Arizona desert" as a phrase. Notice that you need to put double quotes 
      around the phrase
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_CHARSET - defines local charset. Available values: set of 
      charsets supported by mnoGoSearch, e.g. koi8-r, cp1251, ...
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_STOPFILE - Defines name and path
      to stopwords file.  (There is a small difference with mnoGoSearch
      - while in mnoGoSearch if relative path or no path entered, it
      looks for this file in relation to UDM_CONF_DIR, the module looks for
      the file in relation to current path, i.e. to the path where the
      php script is executed.)
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_STOPTABLE - Load stop words from the given SQL table. You may use 
      several StopwordTable commands.
      This command has no effect when compiled without SQL database support.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_WEIGHT_FACTOR - represents weight factors for specific document parts. 
      Currently body, title, keywords, description, url are supported.
      To activate this feature please use degrees of 2 in *Weight commands of
      the indexer.conf. Let's imagine that we have these weights:
     </P
><P
CLASS="literallayout"
><br>
&nbsp;&nbsp;URLWeight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<br>
&nbsp;&nbsp;BodyWeight&nbsp;&nbsp;&nbsp;&nbsp;2<br>
&nbsp;&nbsp;TitleWeight&nbsp;&nbsp;&nbsp;4<br>
&nbsp;&nbsp;KeywordWeight&nbsp;8<br>
&nbsp;&nbsp;DescWeight&nbsp;&nbsp;&nbsp;&nbsp;16<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
><P
>&#13;      As far as indexer uses bit OR operation for word weights when some
      word presents several time in the same document, it is possible at search
      time to detect word appearance in different document parts. Word which
      appears only in the body will have 00000010 argegate weight (in binary notation).
      Word used in all document parts will have 00011111 aggregate weight.
     </P
><P
>&#13;      This parameter's value is a string of hex digits ABCDE. Each digit is a 
      factor for corresponding bit in word weight. For the given above weights
      configuration:
     </P
><P
CLASS="literallayout"
><br>
&nbsp;&nbsp;&nbsp;E&nbsp;is&nbsp;a&nbsp;factor&nbsp;for&nbsp;weight&nbsp;1&nbsp;&nbsp;(URL&nbsp;Weight&nbsp;bit)<br>
&nbsp;&nbsp;&nbsp;D&nbsp;is&nbsp;a&nbsp;factor&nbsp;for&nbsp;weight&nbsp;2&nbsp;&nbsp;(BodyWeight&nbsp;bit)<br>
&nbsp;&nbsp;&nbsp;C&nbsp;is&nbsp;a&nbsp;factor&nbsp;for&nbsp;weight&nbsp;4&nbsp;&nbsp;(TitleWeight&nbsp;bit)<br>
&nbsp;&nbsp;&nbsp;B&nbsp;is&nbsp;a&nbsp;factor&nbsp;for&nbsp;weight&nbsp;8&nbsp;&nbsp;(KeywordWeight&nbsp;bit)<br>
&nbsp;&nbsp;&nbsp;A&nbsp;is&nbsp;a&nbsp;factor&nbsp;for&nbsp;weight&nbsp;16&nbsp;(DescWeight&nbsp;bit)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
><P
>&#13;      Examples:
     </P
><P
>&#13;      UDM_PARAM_WEIGHT_FACTOR=00001 will search through URLs only.
     </P
><P
>&#13;      UDM_PARAM_WEIGHT_FACTOR=00100 will search through Titles only.
     </P
><P
>&#13;      UDM_PARAM_WEIGHT_FACTOR=11100 will search through Title,Keywords,Description
      but not through URL and Body.
     </P
><P
>&#13;      UDM_PARAM_WEIGHT_FACTOR=F9421 will search through:
     </P
><P
CLASS="literallayout"
><br>
&nbsp;&nbsp;&nbsp;&nbsp;Description&nbsp;with&nbsp;factor&nbsp;15&nbsp;&nbsp;(F&nbsp;hex)<br>
&nbsp;&nbsp;&nbsp;&nbsp;Keywords&nbsp;with&nbsp;factor&nbsp;9<br>
&nbsp;&nbsp;&nbsp;&nbsp;Title&nbsp;with&nbsp;factor&nbsp;&nbsp;4<br>
&nbsp;&nbsp;&nbsp;&nbsp;Body&nbsp;with&nbsp;factor&nbsp;2<br>
&nbsp;&nbsp;&nbsp;&nbsp;URL&nbsp;with&nbsp;factor&nbsp;1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
><P
>&#13;      If UDM_PARAM_WEIGHT_FACTOR variable is ommited, original weight value is
      taken to sort results. For a given above weight configuration it means
      that document description has a most big weight 16.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_WORD_MATCH - word match. You may use this parameter to choose 
      word match type. This feature works only in "single" and "multi" modes 
      using SQL based and built-in database. It does not work in cachemode and other modes
      since they use word CRC and do not support substring search. Available values:
     </P
><P
>UDM_MATCH_BEGIN - word beginning match;</P
><P
>UDM_MATCH_END - word ending match;</P
><P
>UDM_MATCH_WORD - whole word match;</P
><P
>UDM_MATCH_SUBSTR - word substring match.</P
></LI
><LI
><P
>&#13;      UDM_PARAM_MIN_WORD_LEN - defines minimal word length.
      Any word shorter this limit is considered to be a stopword. Please note 
      that this parameter value is inclusive, i.e. if UDM_PARAM_MIN_WORD_LEN=3,
      a word 3 characters long will not be considered a stopword, while
      a word 2 characters long will be. Default value is 1.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_ISPELL_PREFIXES - Possible values: UDM_PREFIXES_ENABLED and 
      UDM_PREFIXES_DISABLED, that respectively enable or disable using prefixes.
      E.g. if a word "tested" is in search query, also words like "test", 
      "testing", etc. Only suffixes are supported by default. Prefixes usually
      change word meanings, for example if somebody is searching for the word "tested"
      one hardly wants "untested"  to be found. Prefixes support may also be 
      found useful for site's spelling checking purposes. In order to enable 
      ispell, you have to load ispell data with <A
HREF="function.udm-load-ispell-data.html"
><B
CLASS="function"
>udm_load_ispell_data()</B
></A
>.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_CROSS_WORDS - enables or disables crosswords support.
      Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED.
     </P
><P
>&#13;      The corsswords feature allows to assign words between &#60;a href="xxx"&#62; and &#60;/a&#62;
      also to a document this link leads to. It works in SQL database mode and
      is not supported in built-in database and Cachemode.
     </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Nota: </B
>
       Crosswords are supported only in mnoGoSearch 3.1.11 or later.
      </P
></BLOCKQUOTE
></DIV
></LI
><LI
><P
>&#13;      UDM_PARAM_VARDIR - specifies a custom path to directory where indexer 
      stores data when using built-in database and in cache mode.
      By default <TT
CLASS="literal"
>/var</TT
> directory of
      mnoGoSearch installation is used. Can have 
      only string values. The parameter is available in PHP 4.1.0 or later.
     </P
></LI
><LI
><P
>&#13;      UDM_PARAM_VARDIR - specifies a custom path to directory where indexer 
      stores data when using built-in database and in cache mode.
      By default <TT
CLASS="literal"
>/var</TT
> directory of
      mnoGoSearch installation is used. Can have 
      only string values. The parameter is available in PHP 4.1.0 or later.
     </P
></LI
></UL
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.udm-open-stored.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="ref.msql.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>udm_open_stored</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.mnogo.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>funciones mSQL</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>