<?php defined('SYSPATH') or die('No direct script access.');
class Model_Product extends ORM_Searchable {

    /**
     * Define the fields to index
     */
    public function get_indexable_fields()
    {
        $fields = array();

        // Store the product id but don't index it
        $fields[] = new Search_Field('id', Searchable::UNINDEXED);

        // Index the product name
        $fields[] = new Search_Field('name', Searchable::TEXT);

        // Index but don't store the product description
        $fields[] = new Search_Field('description', Searchable::UNSTORED, Searchable::DECODE_HTML);

        return $fields;
    }

}