blevext

package
v0.0.0-...-70b7a9b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lex

func Lex(input string) ([]*yySymType, error)

Lex extracts tokens from input string.

func NewAllMatchQuery

func NewAllMatchQuery(match string) *allMatchQuery

NewAllMatchQuery is like NewMatchQuery but all extracted terms must match.

Types

type Node

type Node struct {
	Kind     NodeKind
	Children []*Node
	Value    string
}

func Parse

func Parse(input string) (*Node, error)

Parse takes an input query expression and return the parsed node tree, or nil if the expression is empty, or an error. A query expression supports the following constructs (without the single quotes): - query strings: 'symbols_without_spaces_or_parenthesis' - query phrases: '"words withing double quotes" - 'a and b' or 'a or b' - '(a or b) and c'

type NodeKind

type NodeKind int
const (
	NodeAnd NodeKind = iota + 1
	NodeOr
	NodeString
	NodePhrase
)

Jump to

Keyboard shortcuts

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