| 92 | } |
| 93 | |
| 94 | type SearchQuery struct { |
| 95 | // Exactly one of Expression or Constraint must be set. |
| 96 | // If an Expression is set, it's compiled to a Constraint. |
| 97 | |
| 98 | // Expression is a textual search query in minimal form, |
| 99 | // e.g. "hawaii before:2008" or "tag:foo" or "foo" or "location:portland" |
| 100 | // See expr.go and expr_test.go for all the operators. |
| 101 | Expression string `json:"expression,omitempty"` |
| 102 | Constraint *Constraint `json:"constraint,omitempty"` |
| 103 | |
| 104 | // Limit is the maximum number of returned results. A negative value means no |
| 105 | // limit. If unspecified, a default (of 200) will be used. |
| 106 | Limit int `json:"limit,omitempty"` |
| 107 | |
| 108 | // Sort specifies how the results will be sorted. It defaults to CreatedDesc when the |
| 109 | // query is about permanodes only. |
| 110 | Sort SortType `json:"sort,omitempty"` |
| 111 | |
| 112 | // Around specifies that the results, after sorting, should be centered around |
| 113 | // this result. If Around is not found the returned results will be empty. |
| 114 | // If both Continue and Around are set, an error is returned. |
| 115 | Around blob.Ref `json:"around,omitempty"` |
| 116 | |
| 117 | // Continue specifies the opaque token (as returned by a |
| 118 | // SearchResult) for where to continue fetching results when |
| 119 | // the Limit on a previous query was interrupted. |
| 120 | // Continue is only valid for the same query (Expression or Constraint), |
| 121 | // Limit, and Sort values. |
| 122 | // If empty, the top-most query results are returned, as given |
| 123 | // by Limit and Sort. |
| 124 | // Continue is not compatible with the Around option. |
| 125 | Continue string `json:"continue,omitempty"` |
| 126 | |
| 127 | // If Describe is specified, the matched blobs are also described, |
| 128 | // as if the Describe.BlobRefs field was populated. |
| 129 | Describe *DescribeRequest `json:"describe,omitempty"` |
| 130 | } |
| 131 | |
| 132 | func (q *SearchQuery) URLSuffix() string { return "camli/search/query" } |
| 133 |
nothing calls this directly
no outgoing calls
no test coverage detected