Public Member Functions

ilLuceneFileSearch Class Reference

Public Member Functions

 ilLuceneFileSearch (&$qp_obj)
 Constructor public.
performSearch ()

Detailed Description

Definition at line 35 of file class.ilLuceneFileSearch.php.


Member Function Documentation

ilLuceneFileSearch::ilLuceneFileSearch ( &$  qp_obj  ) 

Constructor public.

Definition at line 42 of file class.ilLuceneFileSearch.php.

References $ilLog.

        {
                global $ilLog;

                
                $this->log =& $ilLog;
                $this->query_parser =& $qp_obj;
        }

& ilLuceneFileSearch::performSearch (  ) 

Definition at line 50 of file class.ilLuceneFileSearch.php.

References $obj_id, $res, and $result.

        {
                include_once './Services/Search/classes/Lucene/class.ilLuceneRPCAdapter.php';
                include_once './Services/Search/classes/class.ilSearchResult.php';

                $result =& new ilSearchResult();

                $rpc_adapter =& new ilLuceneRPCAdapter();
                $rpc_adapter->setMode('query');
                $rpc_adapter->setSearchFilter(array('file'));
                $rpc_adapter->setQueryString($this->query_parser->getLuceneQueryString());

                if(($res = $rpc_adapter->send()) === false)
                {
                        $this->log->write('Lucene searcher: Error performing search');
                }
                elseif(count($res))
                {
                        foreach($res as $obj_id => $obj_type)
                        {
                                $result->addEntry($obj_id,$obj_type,array());
                        }
                }
                return $result;
        }


The documentation for this class was generated from the following file: