Collection of search results with convenient accessors
Public fields
items
List of Result objects
query
Search query
mode
Search mode
time_ms
Execution time in ms
Methods
Method new()
Create a new Results object
Usage
Results$new(items = list(), query = "", mode = "hybrid", time_ms = 0)
Arguments
items
List of Result objects
query
Search query string
mode
Search mode used
time_ms
Execution time in milliseconds
Method texts()
Get all result texts
Returns
Character vector of texts
Method ids()
Get all result IDs
Returns
Character vector of IDs
Method scores()
Get all scores
Returns
Numeric vector of scores
Method top()
Get top result
Returns
Result object or NULL if empty
Method foreach()
Iterate over results
Arguments
fn
Function to apply to each result
Method clone()
The objects of this class are cloneable with this method.
Usage
Results$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.