Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanQuery ¶
type BooleanQuery struct { Must []Json `json:"must"` Should []Json `json:"should"` Filter []Json `json:"filter"` }
Used for SearchEndpointRequests.
type BulkRequestCreate ¶
type BulkRequestCreate struct { Create struct { Index string `json:"_index"` Id string `json:"_id"` } `json:"create"` }
Used for making OpenSearch /_bulk requests.
type ClubSearchRequest ¶
type ClubSearchRequest struct { Search string `json:"search"` MinMembers int `json:"min_members"` MaxMembers int `json:"max_members"` Tags []string `json:"tags"` }
JSON parameters for an API GET /api/v1/search/clubs request.
func (*ClubSearchRequest) Index ¶
func (q *ClubSearchRequest) Index() string
func (*ClubSearchRequest) ToSearchEndpointRequest ¶
func (q *ClubSearchRequest) ToSearchEndpointRequest() SearchEndpointRequest
To Query DSL JSON
type EventSearchRequest ¶
type EventSearchRequest struct { Search string `json:"search"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` EventType []models.EventType `json:"event_type"` Clubs []string `json:"clubs"` Tags []string `json:"tags"` }
JSON parameters for an API GET /api/v1/search/events request.
func (*EventSearchRequest) Index ¶
func (q *EventSearchRequest) Index() string
func (*EventSearchRequest) ToSearchEndpointRequest ¶
func (q *EventSearchRequest) ToSearchEndpointRequest() SearchEndpointRequest
To Query DSL JSON
type SearchEndpointRequest ¶
type SearchEndpointRequest Json
Used for making OpenSearch GET /<index>/_search requests. OpenSearch's DSL is such that we can't make this a nice static struct with all the fields specified; depending on what we are looking to search we'll need to add different clauses.
type SearchEndpointResponse ¶
type SearchEndpointResponse struct { Hits struct { Hits []struct { Index string `json:"_index"` Score float32 `json:"_score"` Id string `json:"_id"` } `json:"hits"` } `json:"hits"` }
Used for responses from OpenSearch GET /<index>/_search requests.
type SearchRequest ¶
type SearchResult ¶
type Searchable ¶
type ToSearchDocument ¶
type ToSearchDocument interface {
ToSearchDocument() interface{}
}
Click to show internal directories.
Click to hide internal directories.