mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
reset
This commit is contained in:
@@ -28,10 +28,8 @@ var es *ElasticService
|
||||
|
||||
func init() {
|
||||
es = &ElasticService{url: setting.Conf.SearchURL, c: new(http.Client)}
|
||||
if setting.Conf.RunMode == setting.PROD {
|
||||
initIndex()
|
||||
}
|
||||
}
|
||||
|
||||
func initIndex() {
|
||||
mappings := fmt.Sprintf(`{"mappings":{"%s":{"properties":{"content":{"analyzer":"ik_syno","search_analyzer":"ik_syno","term_vector":"with_positions_offsets","type":"string"},"date":{"index":"not_analyzed","type":"date"},"slug":{"type":"string"},"tag":{"index":"not_analyzed","type":"string"},"title":{"analyzer":"ik_syno","search_analyzer":"ik_syno","term_vector":"with_positions_offsets","type":"string"}}}}}`, TYPE)
|
||||
|
||||
Reference in New Issue
Block a user