Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/search #6

Merged
merged 8 commits into from
Aug 28, 2024
Merged

Feat/search #6

merged 8 commits into from
Aug 28, 2024

Conversation

wsm25
Copy link
Contributor

@wsm25 wsm25 commented Aug 24, 2024

No description provided.

@wsm25
Copy link
Contributor Author

wsm25 commented Aug 24, 2024

目前完成的内容:

  • 从请求到数据库读写的全流程模型、方法添加
  • 分词库的引用

待完成的内容

  • 添加分词字典和停用词 (作为静态资源文件)
  • 实机测试搜索表现

@wsm25 wsm25 requested a review from dujiajun August 24, 2024 16:46
Comment on lines +18 to +20
func (i *SearchIndex) Scan(value interface{}) error { return nil }
func (i SearchIndex) Value() (driver.Value, error) { return nil, nil }
func (i SearchIndex) GormDataType() string { return "tsvector" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥一个接收器是指针,另外几个不是

Copy link
Contributor Author

@wsm25 wsm25 Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://gorm.io/docs/data_types.html 因为文档如此 抄的(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

行吧,IDE和lint如果没有警告的话就这样了

util/fenci.go Outdated

var seg gse.Segmenter

func Fenci(src string) []string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要叫这个名字吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那叫 SegWord 可以吗

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以

@dujiajun dujiajun merged commit 1d38239 into main Aug 28, 2024
2 checks passed
@wsm25 wsm25 deleted the feat/search branch August 29, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants