fulltext

package
v0.0.0-...-ce71dfa Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2012 License: BSD-2-Clause-Views Imports: 5 Imported by: 2

README

fulltext

Fulltext module helps to add fulltext search and indexing capability to noCrud.

If you have the terminal installed, just issue

install "exampleResource" "fulltext"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateQuery

func GenerateQuery(s string) []interface{}

Generates [{"fulltext": \^keyword1\}, {"fulltext": \^keyword2\}] With this query we can create a good enough full text search, which can search at the beginning of the keywords. We could write regexes which searches in the middle of the words too, but that query could not uzilize the btree indexes of mongodb. This solution must be efficient, assuming mongodb does the expected sane things: utilizing indexes with ^ regexes, "$and" queries and arrays.

Types

type C

type C struct {
}

func (*C) Install

func (c *C) Install(o iface.Document, s string) error

func (*C) ProcessQuery

func (c *C) ProcessQuery(inp map[string]interface{})

func (*C) RegenerateFulltext

func (c *C) RegenerateFulltext(a iface.Filter) error

func (*C) SaveFulltext

func (c *C) SaveFulltext(a iface.Filter) error

func (*C) Uninstall

func (c *C) Uninstall(o iface.Document, s string) error

Jump to

Keyboard shortcuts

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