pub struct SearchQueryBuilder { /* private fields */ }Expand description
Builder for SearchQuery.
Implementations§
Source§impl SearchQueryBuilder
impl SearchQueryBuilder
Sourcepub fn limit(&mut self, value: u8) -> &mut Self
pub fn limit(&mut self, value: u8) -> &mut Self
The maximum number of annotations to return.
Default: 20. Range: [ 0 .. 200 ]
Sourcepub fn sort(&mut self, value: Sort) -> &mut Self
pub fn sort(&mut self, value: Sort) -> &mut Self
The field by which annotations should be sorted One of created, updated, id, group, user
Default: updated
Sourcepub fn search_after<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn search_after<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Example: “2019-01-03T19:46:09.334Z”
Define a start point for a subset (page) of annotation search results.
NOTE: make sure to set sort to Sort::Asc if using search_after
Sourcepub fn offset(&mut self, value: usize) -> &mut Self
pub fn offset(&mut self, value: usize) -> &mut Self
The number of initial annotations to skip in the result set.
Default: 0. Range: <= 9800. search_after is more efficient.
Sourcepub fn order(&mut self, value: Order) -> &mut Self
pub fn order(&mut self, value: Order) -> &mut Self
The order in which the results should be sorted. One of asc, desc
Default: desc
Sourcepub fn uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations matching the specific URI or equivalent URIs.
URI can be a URL (a web page address) or a URN representing another kind of resource such as DOI (Digital Object Identifier) or a PDF fingerprint.
Sourcepub fn uri_parts<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn uri_parts<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations containing the given keyword (tokenized chunk) in the URI. The value must exactly match an individual URI keyword.
Sourcepub fn wildcard_uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn wildcard_uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations whose URIs match the wildcard pattern.
Sourcepub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations made by the specified user. (in the format acct:<username>@<authority>)
Sourcepub fn group<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn group<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations made in the specified group (by group ID).
Sourcepub fn tag<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn tag<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations tagged with the specified value.
Similar to tag but allows a list of multiple tags.
Sourcepub fn any<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn any<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations who contain the indicated keyword in any of the following fields:
quote, tags, text, url
Sourcepub fn quote<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn quote<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations that contain this text inside the text that was annotated.
Sourcepub fn references<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn references<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Returns annotations that are replies to this parent annotation ID.
Sourcepub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Limit the results to annotations that contain this text in their textual body.
Sourcepub fn builder(&self) -> Result<SearchQuery, SearchQueryBuilderError>
pub fn builder(&self) -> Result<SearchQuery, SearchQueryBuilderError>
Source§impl SearchQueryBuilder
impl SearchQueryBuilder
Sourcepub fn build(&self) -> Result<SearchQuery, HypothesisError>
pub fn build(&self) -> Result<SearchQuery, HypothesisError>
Builds a new SearchQuery.
Trait Implementations§
Source§impl Clone for SearchQueryBuilder
impl Clone for SearchQueryBuilder
Source§fn clone(&self) -> SearchQueryBuilder
fn clone(&self) -> SearchQueryBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more