Michel_ VIP
Total posts: 61
24 Май 2015 18:20

I created a new custom field following your doc explanations.

The field I created is not searchable.

I only have a small problem.

When I look the DB tables, a new js_res_record_values record is inserted. This record seems useless because Cobalt used the same information stored in js_res_record.

How can I do to avoid to new record creation in js_res_record_values ?

Regards.

Последние изменения: 25 Май 2015


Sergey
Total posts: 13,748
25 Май 2015 05:02

This is index for filters not for text search. If you want to avoid it simply create method in your field.

public function onStoreValues($validData, $record)
{
    return NULL;
}

This is the method that return what should be stored in that table. But if you ever plan to make your field filterable, then better keep that data.

Another important point is that even if field that can be filterable but filters not enabled will still save that data, so that when filters are emeabled, it can search through articles added erlier.

Работает на Cobalt