http

package
v0.0.0-...-f4c30ac Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIndex

func AddIndex(w http.ResponseWriter, req *http.Request)

AddIndex add search engine index

func DelIndex

func DelIndex(w http.ResponseWriter, req *http.Request)

DelIndex remove search engine index

func Post

func Post(apiUrl string, params url.Values) (rs []byte, err error)

Post http post, params is url.Values type

func Search(w http.ResponseWriter, req *http.Request)

Search search for documents

func WgDist

func WgDist(w http.ResponseWriter, req *http.Request)

WgDist dist

func WgPost

func WgPost(url string, param url.Values)

WgPost post

Types

type JsonResponse

type JsonResponse struct {
	Code      int64  `json:"code"`
	Len       int    `json:"len"`
	Timestamp int64  `json:"timestamp"`
	Docs      []Text `json:"docs"`
}

JsonResponse search Json response

type Text

type Text struct {
	Id string `json:"id"`
	// Id      uint64      `json:"id"`
	Content string      `json:"content"`
	Score   []float32   `json:"score"`
	Attri   types.Attri `json:"attri"`
}

Text search for documents

Jump to

Keyboard shortcuts

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