diff --git a/filter.go b/filter.go index 1f9c90e..25b07ff 100644 --- a/filter.go +++ b/filter.go @@ -62,6 +62,11 @@ type PropertyFilter struct { func (f PropertyFilter) filter() {} +type SearchFilter struct { + Value string `json:"value"` + Property string `json:"property"` +} + type TextFilterCondition struct { Equals string `json:"equals,omitempty"` DoesNotEqual string `json:"does_not_equal,omitempty"` diff --git a/search.go b/search.go index 01e1250..9937ee3 100644 --- a/search.go +++ b/search.go @@ -39,11 +39,11 @@ func (sc *SearchClient) Do(ctx context.Context, request *SearchRequest) (*Search } type SearchRequest struct { - Query string `json:"query,omitempty"` - Sort *SortObject `json:"sort,omitempty"` - Filter interface{} `json:"filter,omitempty"` - StartCursor Cursor `json:"start_cursor,omitempty"` - PageSize int `json:"page_size,omitempty"` + Query string `json:"query,omitempty"` + Sort *SortObject `json:"sort,omitempty"` + Filter SearchFilter `json:"filter,omitempty"` + StartCursor Cursor `json:"start_cursor,omitempty"` + PageSize int `json:"page_size,omitempty"` } type SearchResponse struct {