Search works only in ... new Area('Main');

Permalink
Hello,

my SearchEngine is dosent work (find nothing) in other Content-Areas:

<?php $MainContent2 = new Area('Main2');
$MainContent2->display($c);
?>

Works fine (find Words) in:
<?php $MainContent1 = new Area('Main');
$MainContent1->display($c); ?>

Why? Oh lord... is to late. I have 1000000 x click "Index Search Engine" - only "Main" Content be indexed... :(

Can anyone help me? THX schon mal :) Vielleicht hann jemand deutsch?

Sascha

 
Tony replied on at Permalink Reply
Tony
I personally think that the indexer should search all areas by default, but it doesn't. right now, you have to specify each area you want it to index. Here's how:

first copy /concrete/jobs/index_search.php to /jobs/index_search.php

Then add the addSearchableArea() method to the run():
public function run() {
      Loader::library('database_indexed_search');
      $is = new IndexedSearch();
      $is->addSearchableArea('MY NEW AREA NAME GOES HERE')
      $result = $is->reindex(GUEST_GROUP_ID);
      return t('%s page(s) indexed.', $result->count);
   }


Hope that helps.
saschaelk replied on at Permalink Reply
IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
danke danke danke :) Thank You!! :D :D :)