DEBUG
This commit is contained in:
@@ -35,7 +35,8 @@ CREATE INDEX idx_color_1_b ON web_images(color_1_b);
|
||||
|
||||
-- 全文索引
|
||||
CREATE FULLTEXT INDEX idx_images_desc ON web_images (images_desc);
|
||||
|
||||
CREATE FULLTEXT INDEX idx_tags ON web_images (tags);
|
||||
CREATE FULLTEXT INDEX idx_tags ON web_article (tags);
|
||||
|
||||
```
|
||||
|
||||
|
@@ -668,7 +668,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
||||
if p.Args["tags"] != nil {
|
||||
tags := strings.Split(strings.ReplaceAll(p.Args["tags"].(string), " ", ""), ",")
|
||||
for _, tag := range tags {
|
||||
query = query.Where(goqu.L("MATCH(web_images.images_tags) AGAINST (? IN NATURAL LANGUAGE MODE)", tag))
|
||||
query = query.Where(goqu.L("MATCH(web_images.tags) AGAINST (? IN NATURAL LANGUAGE MODE)", tag))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user