mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add optional parameter $order to search() which is passed to find()
This commit is contained in:
parent
a8034350ef
commit
5fc160a8dc
|
@ -70,7 +70,7 @@ class SeedDMS_SQliteFTS_Search {
|
|||
* @param object $index SQlite FTS index
|
||||
* @return object instance of SeedDMS_Lucene_Search
|
||||
*/
|
||||
function search($term, $fields=array(), $limit=array()) { /* {{{ */
|
||||
function search($term, $fields=array(), $limit=array(), $order=array()) { /* {{{ */
|
||||
$querystr = '';
|
||||
$term = trim($term);
|
||||
if($term) {
|
||||
|
@ -140,7 +140,7 @@ class SeedDMS_SQliteFTS_Search {
|
|||
$querystr .= '*)';
|
||||
}
|
||||
try {
|
||||
$result = $this->index->find($querystr, $limit);
|
||||
$result = $this->index->find($querystr, $limit, $order);
|
||||
$recs = array();
|
||||
foreach($result["hits"] as $hit) {
|
||||
$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->documentid);
|
||||
|
|
Loading…
Reference in New Issue
Block a user