es

package
v0.0.0-...-ddf2a0b Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	House = "house"
)
View Source
const (
	SearchSize = 100
)

Variables

This section is empty.

Functions

func Println

func Println(q elastic.Query)

func Source

func Source(q elastic.Query) (string, error)

Types

type Client

type Client struct {
	Client *elastic.Client
	Conf   *Conf
	// contains filtered or unexported fields
}

func (*Client) FilterId

func (c *Client) FilterId(cityId, districtId int64, defId ...int) *elastic.BoolQuery

func (*Client) Index

func (c *Client) Index(m map[string]interface{}) error

func (*Client) Query

func (c *Client) Query(title string, cityId, districtId int64, page, count int) (
	int64, []map[string]interface{}, error)

type Conf

type Conf struct {
	URL     string `toml:"url" yaml:"url"`
	Sniff   *bool  `toml:"sniff" yaml:"sniff"`
	SetGzip *bool  `toml:"gzip" yaml:"gzip"`
}

func (*Conf) Init

func (c *Conf) Init() error

func (*Conf) New

func (c *Conf) New(ctx1 context.Context) (*Client, error)

Jump to

Keyboard shortcuts

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