udm_get_res_field
(PHP 4 >= 4.0.5, PHP 5 <= 5.0.5, PECL mnogosearch >= 1.0.0)
udm_get_res_field — Fetch a result field
Описание
string udm_get_res_field
( resource
$res
, int $row
, int $field
)Fetch a mnoGoSearch result field.
Список параметров
-
res
-
res
- a link to result identifier, received after call to udm_find(). -
row
-
row
- the number of the link on the current page. May have values from 0 toUDM_PARAM_NUM_ROWS-1
. -
field
-
field
- field identifier, may have the following values:-
UDM_FIELD_URL
- document URL field -
UDM_FIELD_CONTENT
- document Content-type field (for example, text/html). -
UDM_FIELD_CATEGORY
- document category field. Use udm_cat_path() to get full path to current category from the categories tree root. (This parameter is available only in PHP 4.0.6 or later). -
UDM_FIELD_TITLE
- document title field. -
UDM_FIELD_KEYWORDS
- document keywords field (from META KEYWORDS tag). -
UDM_FIELD_DESC
- document description field (from META DESCRIPTION tag). -
UDM_FIELD_TEXT
- document body text (the first couple of lines to give an idea of what the document is about). -
UDM_FIELD_SIZE
- document size. -
UDM_FIELD_URLID
- unique URL ID of the link. -
UDM_FIELD_RATING
- page rating (as calculated by mnoGoSearch). -
UDM_FIELD_MODIFIED
- last-modified field in unixtime format. -
UDM_FIELD_ORDER
- the number of the current document in set of found documents. -
UDM_FIELD_CRC
- document CRC.
-
Возвращаемые значения
udm_get_res_field() returns result field value on
success, FALSE
on error.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с поисковыми системами
- mnoGoSearch
- udm_add_search_limit
- udm_alloc_agent_array
- udm_alloc_agent
- udm_api_version
- udm_cat_list
- udm_cat_path
- udm_check_charset
- udm_clear_search_limits
- udm_crc32
- udm_errno
- udm_error
- udm_find
- udm_free_agent
- udm_free_ispell_data
- udm_free_res
- udm_get_doc_count
- udm_get_res_field
- udm_get_res_param
- udm_hash32
- udm_load_ispell_data
- udm_set_agent_param
Коментарии
The returned page description is only 100 characters long.
To store more information, you can change the appropriate database field length to 255 characters (field "description" in the table "url"), and change the following line in udm_common.h.
#define UDM_MAXTEXTSIZE 255
To further improve the "description" field quality, there are two additional techniques you can use.
First, you can define this value if you know it, by setting a description meta tag in the head section.
Second, mnogosearch has an <index></noindex> tag pair that appears to make the enclosed content completely invisible to the search engine. I've used this on the sites I maintain to 'vanish' the navigational elements, field names, and other non-content type HTML and page window dressing so that only the important content is indexed and reported on.
This last technique as an added (and more important benefit) of helping to eliminate a lot of false matches in searches.
It seems the description length is now determined by UDM_MAXDESCSIZE in udm_common.h instead of UDM_MAXTEXTSIZE
Use the function udm_get_res_field_ex() to fetch "non-standard" sections.
Example:
<?php
$tags = udm_get_res_field_ex($agent, $row, "meta.mytag");
?>