com

package
v0.0.0-...-fee7c4b Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 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.SearchResp

Search search

Types

type Config

type Config struct {
	Engine Engine
	Etcd   Etcd
	Rpc    Rpc

	// Has  [][]string
	Url []string
}

Config search config options

var (
	// Searcher is coroutine safe
	Searcher = riot.Engine{}
	// Conf is config
	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
}

Engine search engine options

type Etcd

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

Etcd search etcd options

type Rpc

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

Rpc search rpc options

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