Set .lucene-index for easier deployments

This commit is contained in:
Ingo Schommer 2014-07-05 15:33:05 +12:00
parent aacf5d6fe5
commit 1db411eca5
1 changed files with 5 additions and 0 deletions

View File

@ -59,3 +59,8 @@ DocumentationSearch::$boost_by_path = array(
// Changelogs have heaps of phrases, but are rarely relevant for content searches
'/^changelog/' => 0.05
);
// Set shared index (avoid issues with different temp paths between CLI and web users)
if(file_exists(BASE_PATH . '/.lucene-index')) {
DocumentationSearch::set_index(BASE_PATH . '/.lucene-index');
}