Search function with custom area names
Permalink
I named my content areas something like "Content Top", "Content Main", "Content Bottom". Search indexing does not seem to index these areas. How do I make sure that search actually indexes my areas and not just the default "Main"?
I changed the code but it doesn't work. What actually happens is that the re-indexing takes forever and it never completes. Here is my code:
function run() { Loader::library('database_indexed_search'); $is = new IndexedSearch(); $is->addSearchableArea('Content Top Left')); $result = $is->reindex(); return t('%s page(s) indexed.', $result->count); }
you might have run into a timeout issue, either an apache timeout or a php timeout.
just guessing - but do your area handles actually have spaces in them?
Yes my area names have spaces. One area is named as "Content Top Left".
Does "addSearchableArea" function not take spaces in the area names? I can change them if thats the case but if I do it does my content disappear from the live pages?
Does "addSearchableArea" function not take spaces in the area names? I can change them if thats the case but if I do it does my content disappear from the live pages?
more discussion on this here:
http://www.concrete5.org/community/forums/block_requests/bad_search...
(we should change this so it indexes all areas by default, perhaps just excluding sidebars)