58 include_once(
'Services/FileSystemStorage/classes/class.ilFileSystemStorage.php');
62 $query =
"SELECT * FROM file_data ".
63 "WHERE file_type IN ('text/plain','application/pdf','text/html','text/x-pdf','application/x-pdf')";
65 $res = $this->db->query($query);
73 $bname .= (
"/ilFiles/");
75 $vname = (sprintf(
"%03d", $row->version));
77 if(is_file($bname.
'/'.$vname.
'/'.$row->file_name))
79 $files[$row->file_id] = $bname.
'/'.$vname.
'/'.$row->file_name;
83 $files[$row->file_id] = $bname.
'/'.$row->file_name;
86 $this->log->write(
'Lucene indexer: Found '.$counter.
' files for indexing');
91 include_once
'./Services/Search/classes/Lucene/class.ilLuceneRPCAdapter.php';
94 $rpc_adapter->setMode(
'file');
95 $rpc_adapter->setFiles(
$files);
96 if($rpc_adapter->send())
98 $this->log->write(
'Lucene indexer: files sent');
107 $query =
"SELECT * FROM object_data WHERE type = 'htlm'";
108 $res = $this->db->query($query);
116 $this->log->write(
'Lucene indexer: Found '.$counter.
' html learning modules for indexing');
121 include_once
'./Services/Search/classes/Lucene/class.ilLuceneRPCAdapter.php';
124 $rpc_adapter->setMode(
'htlm');
125 $rpc_adapter->setHTLMs($lms);
126 if($rpc_adapter->send())
128 $this->log->write(
'Lucene indexer: files sent');
135 include_once
'./Services/Search/classes/Lucene/class.ilLuceneRPCAdapter.php';
138 $rpc_adapter->setMode(
'flush');
139 if($rpc_adapter->send())
141 $this->log->write(
'Lucene indexer: deleted index');