core

package
v0.0.0-...-918a76a Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoopNeighbours

func LoopNeighbours(latitude, longitude float64, precision uint, loop int) (neighbours []string)

Types

type Cacher

type Cacher struct {
	// contains filtered or unexported fields
}

缓存器

func (*Cacher) Get

func (c *Cacher) Get(key string, offset, limit int) (types.ScoredDocuments, int)

读缓存

func (*Cacher) Init

func (c *Cacher) Init()

func (*Cacher) Set

func (c *Cacher) Set(key string, value types.ScoredDocuments)

写缓存

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

func (*Indexer) Add

func (i *Indexer) Add(doc *types.IndexedDocument)

func (*Indexer) Init

func (i *Indexer) Init(option *types.IndexerOptions)

func (*Indexer) Remove

func (i *Indexer) Remove(docid uint64)

func (*Indexer) Search

func (i *Indexer) Search(countonly bool, hash string, latitude, longitude float64, options *types.SearchOptions) (docs types.ScoredDocuments, count int)

Jump to

Keyboard shortcuts

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