search

package
v0.0.0-...-07cd16e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchOptions

type SearchOptions struct {
	IgnoreHits          bool `json:"ignore_hits"`
	IgnoreHighlightHits bool `json:"ignore_highlight_hits"`
	IgnoreIDList        bool `json:"ignore_id_list"`
	WithThumbnails      bool `json:"with_thumbnails"`
}

SearchOptions is the options for showing search responses

type SearchRequest

type SearchRequest struct {
	Method      string
	Url         string
	Token       string
	RequestBody *SearchRequestBody
}

func (SearchRequest) Search

func (r SearchRequest) Search() (searchResp SearchResponse, err error)

type SearchRequestBody

type SearchRequestBody struct {
	Query   string                 `json:"query"`
	Params  map[string]interface{} `json:"params"`
	Options SearchOptions          `json:"options"`
}

SearchRequestBody is the expected request body for search route

type SearchResponse

type SearchResponse struct {
	Page        int          `json:"page"`
	NbHits      int          `json:"nbHits"`
	NbPage      int          `json:"nbPages"`
	HitsPerPage int          `json:"hitsPerPage`
	IdList      []string     `json:"idList"`
	Hits        []synq.Asset `json:"hits"`
}

Jump to

Keyboard shortcuts

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