types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDoc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDoc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDoc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTermQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTermQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTermQuery = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Document

type Document struct {
	Id          string     `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	IntId       uint64     `protobuf:"varint,2,opt,name=IntId,proto3" json:"IntId,omitempty"`
	BitsFeature uint64     `protobuf:"varint,3,opt,name=BitsFeature,proto3" json:"BitsFeature,omitempty"`
	Keywords    []*Keyword `protobuf:"bytes,4,rep,name=Keywords,proto3" json:"Keywords,omitempty"`
	Bytes       []byte     `protobuf:"bytes,5,opt,name=Bytes,proto3" json:"Bytes,omitempty"`
}

func (*Document) Descriptor

func (*Document) Descriptor() ([]byte, []int)

func (*Document) GetBitsFeature

func (m *Document) GetBitsFeature() uint64

func (*Document) GetBytes

func (m *Document) GetBytes() []byte

func (*Document) GetId

func (m *Document) GetId() string

func (*Document) GetIntId

func (m *Document) GetIntId() uint64

func (*Document) GetKeywords

func (m *Document) GetKeywords() []*Keyword

func (*Document) Marshal

func (m *Document) Marshal() (dAtA []byte, err error)

func (*Document) MarshalTo

func (m *Document) MarshalTo(dAtA []byte) (int, error)

func (*Document) MarshalToSizedBuffer

func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) Reset

func (m *Document) Reset()

func (*Document) Size

func (m *Document) Size() (n int)

func (*Document) String

func (m *Document) String() string

func (*Document) Unmarshal

func (m *Document) Unmarshal(dAtA []byte) error

func (*Document) XXX_DiscardUnknown

func (m *Document) XXX_DiscardUnknown()

func (*Document) XXX_Marshal

func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Document) XXX_Merge

func (m *Document) XXX_Merge(src proto.Message)

func (*Document) XXX_Size

func (m *Document) XXX_Size() int

func (*Document) XXX_Unmarshal

func (m *Document) XXX_Unmarshal(b []byte) error

type Keyword

type Keyword struct {
	Field string `protobuf:"bytes,1,opt,name=Field,proto3" json:"Field,omitempty"`
	Word  string `protobuf:"bytes,2,opt,name=Word,proto3" json:"Word,omitempty"`
}

func (*Keyword) Descriptor

func (*Keyword) Descriptor() ([]byte, []int)

func (*Keyword) GetField

func (m *Keyword) GetField() string

func (*Keyword) GetWord

func (m *Keyword) GetWord() string

func (*Keyword) Marshal

func (m *Keyword) Marshal() (dAtA []byte, err error)

func (*Keyword) MarshalTo

func (m *Keyword) MarshalTo(dAtA []byte) (int, error)

func (*Keyword) MarshalToSizedBuffer

func (m *Keyword) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Keyword) ProtoMessage

func (*Keyword) ProtoMessage()

func (*Keyword) Reset

func (m *Keyword) Reset()

func (*Keyword) Size

func (m *Keyword) Size() (n int)

func (*Keyword) String

func (m *Keyword) String() string

func (Keyword) ToString

func (kw Keyword) ToString() string

func (*Keyword) Unmarshal

func (m *Keyword) Unmarshal(dAtA []byte) error

func (*Keyword) XXX_DiscardUnknown

func (m *Keyword) XXX_DiscardUnknown()

func (*Keyword) XXX_Marshal

func (m *Keyword) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keyword) XXX_Merge

func (m *Keyword) XXX_Merge(src proto.Message)

func (*Keyword) XXX_Size

func (m *Keyword) XXX_Size() int

func (*Keyword) XXX_Unmarshal

func (m *Keyword) XXX_Unmarshal(b []byte) error

type TermQuery

type TermQuery struct {
	Keyword *Keyword     `protobuf:"bytes,1,opt,name=Keyword,proto3" json:"Keyword,omitempty"`
	Must    []*TermQuery `protobuf:"bytes,2,rep,name=Must,proto3" json:"Must,omitempty"`
	Should  []*TermQuery `protobuf:"bytes,3,rep,name=Should,proto3" json:"Should,omitempty"`
}

func NewTermQuery

func NewTermQuery(field, keyword string) *TermQuery

func (*TermQuery) And

func (tq *TermQuery) And(querys ...*TermQuery) *TermQuery

Builder模式

func (*TermQuery) Descriptor

func (*TermQuery) Descriptor() ([]byte, []int)

func (TermQuery) Empty

func (tq TermQuery) Empty() bool

func (*TermQuery) GetKeyword

func (m *TermQuery) GetKeyword() *Keyword

func (*TermQuery) GetMust

func (m *TermQuery) GetMust() []*TermQuery

func (*TermQuery) GetShould

func (m *TermQuery) GetShould() []*TermQuery

func (*TermQuery) Marshal

func (m *TermQuery) Marshal() (dAtA []byte, err error)

func (*TermQuery) MarshalTo

func (m *TermQuery) MarshalTo(dAtA []byte) (int, error)

func (*TermQuery) MarshalToSizedBuffer

func (m *TermQuery) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TermQuery) Or

func (tq *TermQuery) Or(querys ...*TermQuery) *TermQuery

func (*TermQuery) ProtoMessage

func (*TermQuery) ProtoMessage()

func (*TermQuery) Reset

func (m *TermQuery) Reset()

func (*TermQuery) Size

func (m *TermQuery) Size() (n int)

func (*TermQuery) String

func (m *TermQuery) String() string

func (TermQuery) ToString

func (tq TermQuery) ToString() string

func (*TermQuery) Unmarshal

func (m *TermQuery) Unmarshal(dAtA []byte) error

func (*TermQuery) XXX_DiscardUnknown

func (m *TermQuery) XXX_DiscardUnknown()

func (*TermQuery) XXX_Marshal

func (m *TermQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TermQuery) XXX_Merge

func (m *TermQuery) XXX_Merge(src proto.Message)

func (*TermQuery) XXX_Size

func (m *TermQuery) XXX_Size() int

func (*TermQuery) XXX_Unmarshal

func (m *TermQuery) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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