search

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	// Consume takes the contents of the translation stack and returns a Node
	// representing the root node of an AST referring to nodes within the stack,
	// and any remaining nodes.
	Consume([]Node) (Node, []Node)
}

A Node is an element of the ESearch translation stack.

type NotFound

type NotFound struct {
	Phrase []string `xml:"PhraseNotFound"`
	Field  []string `xml:"FieldNotFound"`
}

type Op

type Op struct {
	Operation string
	Operands  []Node
}

func (*Op) Consume

func (o *Op) Consume(s []Node) (Node, []Node)

type Term

type Term struct {
	Term    string
	Field   string
	Count   int
	Explode bool
}

func (*Term) Consume

func (tm *Term) Consume(s []Node) (Node, []Node)

type Translation

type Translation struct {
	From string
	To   string
}

type TranslationStack

type TranslationStack []Node

func (*TranslationStack) AST

func (ts *TranslationStack) AST() (Node, error)

AST returns the root node of an abstract syntax tree of the query. Nodes in the TranslationStack are altered by this method.

func (*TranslationStack) UnmarshalXML

func (ts *TranslationStack) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error

type Warnings

type Warnings struct {
	Ignored  []string `xml:"PhraseIgnored"`
	NotFound []string `xml:"QuotedPhraseNotFound"`
	Message  []string `xml:"OutputMessage"`
}

Jump to

Keyboard shortcuts

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