* details.
 *
 * You should have received a copy of the GNU General Public License along with
 * SimpleSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA 02111-1307 USA
 *
 * @package simplesearch
 */
/**
 * SimpleSearchIndexAll snippet, used for indexing all resources with alternate search drivers
 *
 * @package simplesearch
 */
require_once $modx->getOption('sisea.core_path', null, $modx->getOption('core_path') . 'components/simplesearch/') . 'model/simplesearch/simplesearch.class.php';
$search = new SimpleSearch($modx, $scriptProperties);
$search->loadDriver($scriptProperties);
$memoryLimit = $modx->getOption('memory_limit', $scriptProperties, '512M');
@ini_set('memory_limit', $memoryLimit);
@set_time_limit(0);
$includeTVs = $modx->getOption('includeTVs', $scriptProperties, true);
$processTVs = $modx->getOption('processTVs', $scriptProperties, true);
/* build query */
$c = $modx->newQuery('modResource');
$c->where(array('searchable' => true, 'deleted' => false, 'published' => true));
$c->sortby('id', 'ASC');
$resources = $modx->getIterator('modResource', $c);
$i = 0;
foreach ($resources as $resource) {
    $resourceArray = $resource->toArray();
    $templateVars =& $resource->getMany('TemplateVars');
    if (!empty($templateVars) && $includeTVs) {