Name

vt_batch_feed — Add words to a free text update batch.

Synopsis

vt_batch_feed ( in vt_batch any ,
in text_or_xml any ,
in is_del integer ,
in is_xml integer );

Description

This function allows you to add words to a free text update batch. It can be called in sequence to feed group of documents that share a common document ID and the result is similar to the single call whose text_or_xml parameter is concatenation of documents of that group. It is even allowed to mix XML and non-XML documents by feeding an XML document and some text documents: the first document to feed may be an XML document, other documents should be only texts.

If one wishes to mix XML and non-XML documents, knowledge of details of the indexing method is needed. vt_batch_feed assigns a sequence number to every word of the provided document using an internal counter. The call of vt_batch_d_id not only sets document id but also resets this counter to 0. The first element of an XML document should have number 0 so it is impossible to feed an XML document if there were other calls of vt_batch_feed after the last vt_batch_d_id . Moreover, xcontains will ignore words from text documents that were fed after the first XML document, only contains will use all data.

Parameters

vt_batch

must be an object returned by vt_batch on which vt_batch_d_id has been called; e.g. it can be called inside the index hook function

text_or_xml

must be a blob, wide blob, varchar, nvarchar or XML entity object.

is_del

if 0 means that the data is to be added, 1 means the data is to be deleted.

is_xml

if 1, means that the text_or_xml must be a well formed XML fragment and that it will be indexed for use with xcontains . The default is 0 that means "plain text".

Return Types

None.

Examples

Please refer to examples for function vt_batch_feed_offband() .