调整了索引类型,对文章全文进行检索
This commit is contained in:
parent
77883fae1f
commit
f9aa721ddd
|
|
@ -91,13 +91,27 @@ export const entityDesc: EntityDesc<
|
|||
attributes: [
|
||||
{
|
||||
name: 'title',
|
||||
size: 32,
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true,
|
||||
// 索引类型,方便根据标题查找文章
|
||||
type: 'fulltext',
|
||||
// 标题使用btree索引进行前缀搜索
|
||||
type: 'btree',
|
||||
},
|
||||
},
|
||||
// 根据文章内容搜索的全文检索索引
|
||||
{
|
||||
name: 'content_fulltext',
|
||||
attributes: [
|
||||
{
|
||||
name: 'content',
|
||||
},
|
||||
],
|
||||
config: {
|
||||
type: 'fulltext',
|
||||
parser: 'ngram',
|
||||
},
|
||||
}
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue