SolrInputDocument::addField
(PECL solr >= 0.9.2)
SolrInputDocument::addField — Adds a field to the document
Описание
public bool SolrInputDocument::addField
( string
$fieldName
, string $fieldValue
[, float $fieldBoostValue
= 0.0
] )For multi-value fields, if a valid boost value is specified, the specified value will be multiplied by the current boost value for this field.
Список параметров
-
fieldName
-
The name of the field
-
fieldValue
-
The value for the field.
-
fieldBoostValue
-
The index time boost for the field. Though this cannot be negative, you can still pass values less than 1.0 but they must be greater than zero.
Возвращаемые значения
Возвращает TRUE
в случае успешного завершения или FALSE
в случае возникновения ошибки.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с поисковыми системами
- Apache Solr
- Функция SolrInputDocument::addField() - Adds a field to the document
- Функция SolrInputDocument::clear() - Resets the input document
- Функция SolrInputDocument::__clone() - Creates a copy of a SolrDocument
- Функция SolrInputDocument::__construct() - Constructor
- Функция SolrInputDocument::deleteField() - Removes a field from the document
- Функция SolrInputDocument::__destruct() - Destructor
- Функция SolrInputDocument::fieldExists() - Checks if a field exists
- Функция SolrInputDocument::getBoost() - Retrieves the current boost value for the document
- Функция SolrInputDocument::getField() - Retrieves a field by name
- Функция SolrInputDocument::getFieldBoost() - Retrieves the boost value for a particular field
- Функция SolrInputDocument::getFieldCount() - Returns the number of fields in the document
- Функция SolrInputDocument::getFieldNames() - Returns an array containing all the fields in the document
- Функция SolrInputDocument::merge() - Merges one input document into another
- Функция SolrInputDocument::reset() - This is an alias of SolrInputDocument::clear
- Функция SolrInputDocument::setBoost() - Sets the boost value for this document
- Функция SolrInputDocument::setFieldBoost() - Sets the index-time boost value for a field
- Функция SolrInputDocument::sort() - Sorts the fields within the document
- Функция SolrInputDocument::toArray() - Returns an array representation of the input document
Коментарии
The method from second example here solr.examples fails to add document, with following error.
-----
[qtp853119666-20] WARN org.apache.solr.handler.loader.XMLLoader – XML element <add> has invalid XML attr: allowDups
-----
This is possibly a solr bug or pecl issue.
Any help here please?