config

package
v0.0.0-...-6f23c6b Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BM25Parameters

type BM25Parameters struct {
	K1 float32 `yaml:"K1"`
	B  float32 `yaml:"B"`
}

type Cluster

type Cluster struct {
	ShardingNum  int      `yaml:"ShardingNum"`
	ReplicateNum int      `yaml:"ReplicateNum"`
	ManageServer Server   `yaml:"ManageServer"`
	SearchServer []Server `yaml:"SearchServer"`
	DataServer   []Server `yaml:"DataServer"`
}

func InitClusterConfig

func InitClusterConfig(path string) *Cluster

type Config

type Config struct {
	Store   Storage        `yaml:"Storage"`
	BM25    BM25Parameters `yaml:"BM25"`
	Server  Server         `yaml:"Server"`
	Cluster Cluster        `yaml:"Cluster"`
}

func InitConfig

func InitConfig(path string) *Config

type Server

type Server struct {
	Host string `yaml:"Host"`
	Port int    `yaml:"Port"`
}

func (*Server) Address

func (s *Server) Address() string

type Storage

type Storage struct {
	DumpFile  string `yaml:"DumpFile"`
	IndexFile string `yaml:"IndexFile"`
	ModelFile string `yaml:"ModelFile"`
}

Jump to

Keyboard shortcuts

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