search

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDocument

func AddDocument(documents []*Document) (success bool, err error)

func DeleteDocuments

func DeleteDocuments(idList ...uint64) (success bool, err error)

func InitMeiliSearch

func InitMeiliSearch(host, apiKey string, idx ...string) error

func UpdateDocument

func UpdateDocument(documents []*Document) (success bool, err error)

Types

type Document

type Document struct {
	ID           uint64   `json:"id,string"`
	Title        string   `json:"title"`
	Content      string   `json:"content"`
	Route        string   `json:"route"`
	RelatedUsers []string `json:"relatedUsers"`
	CreateTime   int64    `json:"createTime"`
	UpdateTime   int64    `json:"updateTime"`
}
func Search(keyword string, limit, offset int64) (total int64, result []*Document, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL