\addons\docs\libraryFulltextSearch

Summary

Methods
Properties
Constants
config()
reset()
add()
update()
del()
search()
suggestion()
hot()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

config()

config() 

reset()

reset() 

重置搜索索引数据库

add()

add(  $row) 

添加索引

Parameters

$row

Throws

\think\exception\DbException

update()

update(  $row, boolean  $add = false) 

更新索引

Parameters

$row
boolean $add

Throws

\think\exception\DbException

del()

del(  $row) 

删除

Parameters

$row

search()

search(  $q,   $page = 1,   $pagesize = 20,   $order = '',   $fulltext = true,   $fuzzy = false,   $synonyms = false) : array

获取搜索结果

Parameters

$q
$page
$pagesize
$order
$fulltext
$fuzzy
$synonyms

Returns

array

suggestion()

suggestion(string  $q, integer  $limit = 10) 

获取建议搜索关键字

Parameters

string $q

关键字

integer $limit

返回条数

hot()

hot() : array

获取搜索热门关键字

Throws

\XSException

Returns

array