Documentation ¶
Overview ¶
Package entity is the package where we store and manage elasthink's core entity
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Entity entityData
Functions ¶
This section is empty.
Types ¶
type DocumentType ¶
type DocumentType string
DocumentType is a type that represent document type
const ( //AdvertisementCampaignDocument is the document type that represent Advertisement Campaign document type AdvertisementCampaignDocument DocumentType = "advcampaign" //CampaignDocument is the document type that represent Campaign document type (coupon for promotion) CampaignDocument DocumentType = "campaign" )
func (DocumentType) IsValidFromCustomDocumentType ¶
func (dt DocumentType) IsValidFromCustomDocumentType(documentTypeMap map[DocumentType]int) error
//IsValid checks if the document type is a valid (registered) document type in entity const
func (dt DocumentType) IsValid() error { switch dt { case AdvertisementCampaignDocument, CampaignDocument: return nil } return errors.New("Invalid Document Type") }
IsValidFromCustomType checks if the document type is a valid (registered) in a documentTypeMap (Custom Document Type)
type SearchResultRankData ¶
type SearchResultRankData struct { ID int64 `json:"id"` ShowCount int `json:"showCount"` Rank int `json:"rank"` }
SearchResultRankData is the core struct that represent search result rank item
type StopwordData ¶
type StopwordData struct {
Words []string `json:"words"` //Words is a collection of stopwords for a specified language
}
StopwordData is a struct that represent stopwords data that we have in a file for a specified language
Click to show internal directories.
Click to hide internal directories.