public function updateLuceneIndex()
 {
     aZendSearch::updateLuceneIndex($this, array('type' => $this->getType(), 'title' => $this->getTitle(), 'description' => $this->getDescription(), 'credit' => $this->getCredit(), 'tags' => implode(", ", $this->getTags())));
 }
Exemple #2
0
 public function updateLuceneIndex()
 {
     $title = $this->getTitle();
     $summary = $this->getSearchSummary();
     $text = $this->getSearchText();
     $slug = $this->getSlug();
     aZendSearch::updateLuceneIndex($this, array('text' => $text), $this->getCulture(), array('title' => $title, 'summary' => $summary, 'slug' => $slug, 'view_is_secure' => $this->getViewIsSecure()));
 }
Exemple #3
0
 /**
  * DOCUMENT ME
  * @return mixed
  */
 public function updateLuceneIndex()
 {
     if ($this->getAdmin()) {
         // Never index admin pages, that goes against the spirit of
         // keeping them completely out of navigation, they are not
         // a place for content in the normal sense, they are engines
         // for administrative purposes
         return;
     }
     $title = $this->getTitle();
     $engine = $this->getEngine();
     $summary = $this->getSearchSummary();
     $text = $this->getSearchText();
     $tags = implode(',', $this->getTags());
     $categories = array();
     $categoryObjects = $this->getCategories();
     foreach ($categoryObjects as $category) {
         $categories[] = $category->getName();
     }
     $categories = implode(',', $categories);
     $metaDescription = $this->getMetaDescription();
     $slug = $this->getSlug();
     $info = $this->getInfo();
     // Already separate fields, so don't store them twice.
     unset($info['title'], $info['engine']);
     $tags = $this->getTags();
     $args = array('object' => $this, 'indexed' => array('text' => $text, 'slug' => $slug, 'title' => $title, 'tags' => implode(', ', $tags), 'categories' => $categories, 'metadescription' => $metaDescription, 'engine' => $engine), 'culture' => $this->getCulture(), 'stored' => array('title_stored' => $title, 'summary_stored' => $summary, 'slug_stored' => $slug, 'engine_stored' => strlen($engine) ? $engine : '', 'info_stored' => serialize($info)), 'boosts' => array('tags' => 2.0, 'metadescription' => 1.2, 'title' => 3.0), 'keywords' => array('published_at' => preg_replace('/[^\\d]/', '', $this->published_at)));
     if (strlen($engine)) {
         $helperClass = $engine . 'SearchHelper';
         if (class_exists($helperClass)) {
             $searchHelper = new $helperClass();
             $args = $searchHelper->filterUpdateLuceneIndex($args);
         }
     }
     // If a filter returns false, it might be associated with a missing event.
     // don't index
     if (is_array($args)) {
         aZendSearch::updateLuceneIndex($args);
     }
 }
 /**
  * DOCUMENT ME
  */
 public function updateLuceneIndex()
 {
     aZendSearch::updateLuceneIndex(array('object' => $this, 'indexed' => array('type' => $this->getType(), 'title' => $this->getTitle(), 'description' => $this->getDescription(), 'credit' => $this->getCredit(), 'categories' => implode(", ", $this->getCategoryNames()), 'tags' => implode(", ", $this->getTags()))));
 }
 public function updateLuceneIndex()
 {
     if ($this->getAdmin()) {
         // Never index admin pages, that goes against the spirit of
         // keeping them completely out of navigation, they are not
         // a place for content in the normal sense, they are engines
         // for administrative purposes
         return;
     }
     $title = $this->getTitle();
     $summary = $this->getSearchSummary();
     $text = $this->getSearchText();
     $slug = $this->getSlug();
     $info = $this->getInfo();
     // Already a separate field, so don't store it twice.
     // Otherwise though the info structure is well worth it because
     // it lets us check explicit privileges
     unset($info['title']);
     aZendSearch::updateLuceneIndex($this, array('text' => $text), $this->getCulture(), array('title' => $title, 'summary' => $summary, 'slug' => $slug, 'info' => serialize($info)));
 }