🎨 搜索自定义属性改为搜索全部属性 Fix https://github.com/siyuan-note/siyuan/issues/7367

This commit is contained in:
Liang Ding 2023-02-15 14:35:44 +08:00
parent d1f493e2d2
commit fe0f2fb7e0
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
9 changed files with 19 additions and 14 deletions

View file

@ -41,10 +41,10 @@ type Search struct {
Limit int `json:"limit"`
CaseSensitive bool `json:"caseSensitive"`
Name bool `json:"name"`
Alias bool `json:"alias"`
Memo bool `json:"memo"`
Custom bool `json:"custom"`
Name bool `json:"name"`
Alias bool `json:"alias"`
Memo bool `json:"memo"`
IAL bool `json:"ial"`
BacklinkMentionName bool `json:"backlinkMentionName"`
BacklinkMentionAlias bool `json:"backlinkMentionAlias"`
@ -77,10 +77,10 @@ func NewSearch() *Search {
Limit: 64,
CaseSensitive: true,
Name: true,
Alias: true,
Memo: true,
Custom: false,
Name: true,
Alias: true,
Memo: true,
IAL: false,
BacklinkMentionName: true,
BacklinkMentionAlias: false,

View file

@ -866,7 +866,7 @@ func fieldRegexp(regexp string) string {
buf.WriteString(regexp)
buf.WriteString("'")
}
if Conf.Search.Custom {
if Conf.Search.IAL {
buf.WriteString(" OR ial REGEXP '")
buf.WriteString(regexp)
buf.WriteString("'")
@ -889,7 +889,7 @@ func columnFilter() string {
if Conf.Search.Memo {
buf.WriteString(" memo")
}
if Conf.Search.Custom {
if Conf.Search.IAL {
buf.WriteString(" ial")
}
buf.WriteString(" tag}")