question: public IndexCreatedEvent create ( Index index ) { verifyTable ( index . getDatabaseName ( ) , index . getTableName ( ) ) ; ValidationEngine . validateAndThrow ( index ) ; index . setActive ( false ) ; logger . debug ( "Creating index: " + index . toString ( ) ) ; Index created = indexesRepo . create ( index ) ; long dataSize = tablesRepo . countTableSize ( index . getDatabaseName ( ) , index . getTableName ( ) ) ; Date now = new Date ( ) ; UUID uuid = UUID . randomUUID ( ) ; IndexCreatedEvent toReturn = new IndexCreatedEvent ( uuid , now , now , created , dataSize , 0l ) ; statusRepo . create ( toReturn ) ; toReturn . calculateValues ( ) ; DomainEvents . publish ( toReturn ) ; return toReturn ; }
target:  Creates an index. Index will be created synchronously, but it will be populated asynchronously, and it will not be "active" (meaning it can't be used for querying) until indexing is complete. Inactive indexes will still be populated by NEW records that are being inserted.