function insertIntoIndex

Robert9

Active member
#1
insertIntoIndex(string $contentType, integer $contentId, string $title, string $message, integer $itemDate, integer $userId, integer $discussionId, array $metadata)

$metadata
array
Key value pairs of metadata to index.


I want to add a word to the index like "Sweden" for example; how i will do that?
I can add it to $title, to $message or to $metadata?

Is metadata something to ask for a special field?
Can i add metadata['country'] = "Sweden" and then have a special search for the field country?

Say i add a field to table thread with xf_thread.country;
should i save the value of this field in $title, $pagetext or matadata['country']?

Everything i want is that i can search for "Sweden" and got a thread where i have saved "Sweden" for the indexer without having the word "Sweden" in the title or the text of a post.
 
Top