public function define() {
		$index = $this->getIndex();

		if (!$index->exists()) {
			$index->create();
		}

        try {
            $this->createMappings($index);
        } catch (\Elastica\Exception\ResponseException $ex) {
            \SS_Log::log($ex, \SS_Log::WARN);
        }
	}
public function define() {
		$index = $this->getIndex();

		if (!$index->exists()) {
			$index->create();
		}

        try {
            $this->createMappings($index);
        } catch (\Elastica\Exception\ResponseException $ex) {
            \SS_Log::log($ex, \SS_Log::WARN);
        }
	}
public function define ( ) { $ index = $ this -> getIndex ( ) ; if ( ! $ index -> exists ( ) ) { $ index -> create ( ) ; } try { $ this -> createMappings ( $ index ) ; } catch ( \ Elastica \ Exception \ ResponseException $ ex ) { \ SS_Log :: log ( $ ex , \ SS_Log :: WARN ) ; } }
Creates the index and the type mappings.
Creates the index and the type mappings .