Moved indexing and fulltext logic to models.