Custom element type defineSearchableAttributes I have a custom element type with 2 custom fields, 'name' and 'email'.
I can't seem to get the index search working for this element type.
I defined defineSearchableAttributes and returned an array with these 2 attributes.
Searching on the title field works though.

&lt;?php
namespace Craft;

class Newsletter_SubscriptionElementType extends BaseElementType {

public function getName() {
    return Craft::t('Subscriptions');
}

public function hasContent() {
    return true;
}

public function hasTitles() {
    return true;
}

public function populateElementModel($row) {
    return Newsletter_SubscriptionModel::populateModel($row);
}

public function defineCriteriaAttributes() {
    return array(
        'name'      =&gt; AttributeType::String,
        'email'     =&gt; AttributeType::Email
    );
}

public function defineSearchableAttributes() {
    return array('name','email');
}

public function defineTableAttributes() {
    $attributes = array(
        'title'         =&gt; Craft::t('Title'),
        'name'          =&gt; Craft::t('Name'),
        'email'         =&gt; Craft::t('Email'),
        'dateCreated'   =&gt; Craft::t('Date Created')
    );

    return $attributes;
}

public function getTableAttributeHtml(BaseElementModel $element, $attribute) {
    return parent::getTableAttributeHtml($element, $attribute);
}

public function getSources($context = null) {
    $sources = array(
        '*' =&gt; array(
            'label'    =&gt; Craft::t('All subscriptions'),
        )
    );

    return $sources;
}

public function modifyElementsQuery(DbCommand $query, ElementCriteriaModel $criteria) {
    $query 
        -&gt;addSelect('newsletter_subscriptions.name, newsletter_subscriptions.email')
        -&gt;join('newsletter_subscriptions newsletter_subscriptions', 'newsletter_subscriptions.id = elements.id');
}
}
Craft will only extract the search keywords for an element during the element saving process.

If you have existing custom elements already saved, then you go in and add the defineSearchableAttributes() to your element type, you'll need to re-save the existing elements in order for their search keywords to be indexed.

Or now that I think about it... the easier way would probably be to just run the "Update Search Indexes" tool in the Control Panel under Settings->Tools. It will do the same thing for you.