mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
add method getDocument()
this way the access on the index can be identical to SQliteFTS
This commit is contained in:
parent
0363395b9f
commit
ae6044bc77
|
@ -42,6 +42,17 @@ class SeedDMS_Lucene_Search {
|
||||||
$this->version = '3.0.0';
|
$this->version = '3.0.0';
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get document from index
|
||||||
|
*
|
||||||
|
* @param object $index lucene index
|
||||||
|
* @return object instance of SeedDMS_Lucene_Document of false
|
||||||
|
*/
|
||||||
|
function getDocument($id) { /* {{{ */
|
||||||
|
$hits = $this->index->find('document_id:'.$id);
|
||||||
|
return $hits ? $hits[0] : false;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search in index
|
* Search in index
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user