Documentation
¶
Index ¶
Constants ¶
View Source
const (
MaxIndexSize = 600000 // 600KB
)
Variables ¶
This section is empty.
Functions ¶
func StartJobIndex ¶
func StartJobIndex() error
StartJobIndex index sessions in batches based in the period duration A session will be indexed if the indexer plugin is enabled; the session is closed and it contains an e-mail
The index process start a new fresh index and swap it atomically avoiding any downtime in search items in the current index.
See also: http://blevesearch.com/docs/IndexAlias/
Types ¶
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
func NewIndexer ¶
NewIndexer tries to open the last index from the filesystem or open a fresh one.
type SearchRequest ¶
type SearchRequest struct { QueryString string `json:"query" binding:"required"` Limit int `json:"limit"` Offset int `json:"offset"` Highlighter string `json:"highlighter"` Fields []string `json:"fields"` Facets bleve.FacetsRequest `json:"facets"` }
func NewSearchRequest ¶
func NewSearchRequest(query string, limit, offset int, highlighter string) *SearchRequest
NewSearchRequest creates a new request in the index, possible values for highlighter are
ansi or html
func (*SearchRequest) AddFacet ¶
func (s *SearchRequest) AddFacet(facetName string, f *bleve.FacetRequest)
type Session ¶
type Session struct { OrgID string `json:"-"` ID string `json:"session"` User string `json:"user"` Connection string `json:"connection"` ConnectionType string `json:"connection_type"` Verb string `json:"verb"` EventSize int64 `json:"size"` Input string `json:"input"` Output string `json:"output"` IsInputTruncated bool `json:"isinput_trunc"` IsOutputTruncated bool `json:"isoutput_trunc"` IsError bool `json:"error"` StartDate string `json:"started"` EndDate string `json:"completed"` Duration int64 `json:"duration"` }
Click to show internal directories.
Click to hide internal directories.