Doctrine\ODM\CouchDB\Configuration::getLuceneHandlerName PHP Method

getLuceneHandlerName() public method

    public function getLuceneHandlerName()
    {
        if (!$this->attributes['luceneHandlerName']) {
            throw CouchDBException::luceneNotConfigured();
        }
        return $this->attributes['luceneHandlerName'];
    }

Usage Example

Example #1
0
 /**
  * Create a CouchDB-Lucene Query.
  *
  * @param string $designDocName
  * @param string $viewName
  * @return View\ODMLuceneQuery
  */
 public function createLuceneQuery($designDocName, $viewName)
 {
     $luceneHandlerName = $this->config->getLuceneHandlerName();
     $designDoc = $this->config->getDesignDocument($designDocName);
     if ($designDoc) {
         $designDoc = new $designDoc['className']($designDoc['options']);
     }
     $query = new ODMLuceneQuery($this->couchDBClient->getHttpClient(), $this->couchDBClient->getDatabase(), $luceneHandlerName, $designDocName, $viewName, $designDoc);
     $query->setDocumentManager($this);
     return $query;
 }