entities

package
v0.0.0-...-b8a6b6b Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Id               int64     `json:"id"`
	Content          string    `json:"content"`
	TokenizedContent []string  `json:"tokenized_content"`
	CreatedAt        time.Time `json:"created_at"`
	UpdatedAt        time.Time `json:"updated_at"`
}

type DocumentCreate

type DocumentCreate struct {
	Content          string   `json:"content"`
	TokenizedContent []string `json:"tokenized_content"`
}

func NewDocumentCreate

func NewDocumentCreate(content string, tokenizedConetnt []string) *DocumentCreate

type InvertIndex

type InvertIndex struct {
	PostingList *[]Posting `json:"posting_list"`
}

func NewInvertIndex

func NewInvertIndex(postingList *[]Posting) *InvertIndex

type InvertIndexCompressed

type InvertIndexCompressed struct {
	PostingListCompressed []byte `json:"posting_list_compressed"`
}

func NewInvertIndexCompressed

func NewInvertIndexCompressed(postingListCompressed []byte) *InvertIndexCompressed

type Posting

type Posting struct {
	DocumentRelatedId   int64 `json:"document_related_id"`
	PositionsInDocument []int `json:"positions_in_document"`
}

func NewPosting

func NewPosting(documentRelatedId int64, positionsInDocument []int) *Posting

type Query

type Query struct {
	Keywords   *[]string      `json:"keywords"`
	SearchMode SearchModeType `json:"mode"`
}

func NewQuery

func NewQuery(keyword []string, searchMode SearchModeType) *Query

type SearchModeType

type SearchModeType string
const (
	And SearchModeType = "And"
	Or  SearchModeType = "Or"
)

type Term

type Term struct {
	Uuid        uuid.UUID    `json:"uuid"`
	Word        string       `json:"word"`
	InvertIndex *InvertIndex `json:"invert_index"` // タームに対応した転置インデックス.
	CreatedAt   time.Time    `json:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
}

type TermCompressed

type TermCompressed struct {
	Uuid                  uuid.UUID              `json:"uuid"`
	Word                  string                 `json:"word"`
	InvertIndexCompressed *InvertIndexCompressed `json:"invert_index_compressed"` // タームに対応した転置インデックス.
	CreatedAt             time.Time              `json:"created_at"`
	UpdatedAt             time.Time              `json:"updated_at"`
}

type TermCompressedCreate

type TermCompressedCreate struct {
	Word                  string                 `json:"word"`
	InvertIndexCompressed *InvertIndexCompressed `json:"invert_index_compressed"` // タームに対応した転置インデックス.
}

func NewTermCompressedCreate

func NewTermCompressedCreate(word string, invertIndex *InvertIndexCompressed) *TermCompressedCreate

type TermCreate

type TermCreate struct {
	Word        string       `json:"word"`
	InvertIndex *InvertIndex `json:"invert_index"` // タームに対応した転置インデックス.
}

func NewTermCreate

func NewTermCreate(word string, invertIndex *InvertIndex) *TermCreate

Jump to

Keyboard shortcuts

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