com

package
v0.0.0-...-41ae9e4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDocInx

func AddDocInx(docId uint64, data types.DocIndexData, forceUpdate bool)

AddDocInx add index document

func Delete

func Delete(docid uint64, forceUpdate bool)

Delete delete document

func InitEngine

func InitEngine(conf Config)

InitEngine init engine

func Search(sea SearchArgs) types.SearchResponse

Search search

Types

type Config

type Config struct {
	Engine Engine
	Etcd   Etcd
	Rpc    Rpc

	// Has  [][]string
	Url []string
}
var (
	// Searcher is coroutine safe
	Searcher = engine.Engine{}
	Conf     Config
)

type Engine

type Engine struct {
	Mode  string
	Using int

	StorageShards int    `toml:"storage_shards"`
	StorageEngine string `toml:"storage_engine"`
	StorageFolder string `toml:"storage_folder"`

	NumShards     int    `toml:"num_shards"`
	OutputOffset  int    `toml:"output_offset"`
	MaxOutputs    int    `toml:"max_outputs"`
	SegmenterDict string `toml:"segmenter_dict"`
	StopTokenFile string `toml:"stop_token_file"`
	Relation      string
	Time          string
	Ts            int64
}

type Etcd

type Etcd struct {
	Addr     string
	SverName string `toml:"sver_name"`
	Port     []int  `toml:"port"`
}

type Rpc

type Rpc struct {
	GrpcPort []string `toml:"grpc_port"`
	// GrpcPort []int    `toml:"grpc_port"`
	DistPort []string `toml:"dist_port"`
	Port     string
}

type SearchArgs

type SearchArgs struct {
	Id, Query, Time          string
	OutputOffset, MaxOutputs int
	DocIds                   map[uint64]bool
	Logic                    types.Logic
}

SearchArgs search args

Jump to

Keyboard shortcuts

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