Path not found while rebuilding search index on

I try to rebuild search index in and have this problem:

Administrator@OJS c:\xampp\htdocs\journal\tools

php rebuildSearchIndex.php

Clearing index … done
Indexing “Journal name” … The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

I remember that when I was upgrading from 2.4.8, I had over 5 million rows and over 100 MB in my search tables: article_search_keyword_list, article_search_object_keywords, and article_search_objects

Instead of truncating them, I dropped them (didn’t understand the instructions) :(, so they were not present after the upgrade. Now, I just recreated these 3 tables (trying to reproduce the ones in the currently working 2.4.5), but I still have “The system cannot find the path specified”.

Question: Did I need to recreate these tables and if yes, what is the best way to do it? Or is there something else going on here?

Also, rebuildSearchIndex.php has this code that I don’t fully underestand:

  // If we have another argument that this must be a journal path.
  $journal = null;
  if (count($this->argv)) {
  	$journalPath = array_shift($this->argv);
  	$journalDao = DAORegistry::getDAO('JournalDAO');
  	$journal = $journalDao->getByPath($journalPath);
  	if (!$journal) {
  		die (__('search.cli.rebuildIndex.unknownJournal', array('journalPath' => $journalPath)). "\n");

The output of the command displays my “Journal name” properly, so why the path error?! Do I need the run the command from the Tools directory or elsewhere?

Seeing no response, I kept on trying. Turned on debugging and redirected the output into a text file. While CMD was full of “cannot find the path specified”, rebuildSearchIndex.php output generated a 50MB text file with 1,400,000 lines (slightly larger than my database), which doesn’t have any warnings or errors. Instead, it says at the end “2974 articles indexed”. So, the lesson I learned is: “debug = on” is your friend if you see scary messages while rebuilding search index.

Now, the search seems to be working, I can find articles by keywords. I still have no idea why I had those error/warning messages in CMD, but hey…

“Published After” and “Published Before” in “Advanced Filters” doesn’t work, but I will post it as a separate topic.

Hi @Lolekbolek,

Thanks for posting your solution. It will be helpful for others.

Amanda Stevens
Public Knowledge Project Team