Version: v1.0.2 Latest Latest

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

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 4 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


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"`

Source Files

Jump to

Keyboard shortcuts

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