new: Added post search module

This commit is contained in:
2024-12-17 16:15:51 +08:00
parent 474bf3e6bb
commit 9386306e7e
26 changed files with 590608 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/88250/lute"
"github.com/gin-gonic/gin"
"github.com/huichen/wukong/engine"
)
type MApp struct {
@@ -17,10 +18,12 @@ type MApp struct {
Port int
Config *config.MConfig
lute *lute.Lute
engine *gin.Engine
lute *lute.Lute
engine *gin.Engine
searcher *engine.Engine
Posts []*model.MPost
Posts []*model.MPost
IndexedPosts map[uint64]*model.MPost
Tags map[string]string
TagsCount map[string]int
@@ -61,6 +64,8 @@ func NewMApp(cfg *config.MConfig) *MApp {
Port: cfg.Port,
Config: cfg,
IndexedPosts: make(map[uint64]*model.MPost),
Tags: make(map[string]string),
TagsCount: make(map[string]int),