Zeitgeist.Index.search_with_relevancies – zeitgeist-2.0 – Vala Binding Reference

Zeitgeist.Index.search_with_relevancies – zeitgeist-2.0 Reference Manual

# search_with_relevancies

## Description:

public async ResultSet search_with_relevancies (`string` query, TimeRange time_range, `GenericArray`<Event> event_templates, StorageState storage_state, `uint32` offset, `uint32` num_events, ResultType result_type, `Cancellable`? cancellable = null, out `double`[] relevancies) throws `Error`

Perform a full text search possibly restricted to a TimeRange and/or set of event templates. As opposed to zeitgeist_index_search(), this call will also return numeric relevancies of the events in the ResultSet.

See zeitgeist_index_search() for more details on how to create the query.

## Parameters:

query | The search string to send to Zeitgeist
time_range | Restrict matched events to ones within this time range. If you are not interested in restricting the timerange pass zeitgeist_time_range_new_anytime() as Zeitgeist will detect this and optimize the query accordingly
event_templates | Restrict matched events to ones matching these templates
storage_state | Filter the events by availability of the storage medium.
offset | Offset into the result set to read events from
num_events | Maximal number of events to retrieve
result_type | The ResultType determining the sort order You may pass ResultType.RELEVANCY to this method to have the results ordered by relevancy calculated in relation to "query"
cancellable | a `GLib.Cancellable` to cancel the operation or %NULL
relevancies | numeric relevancies of the events returned by result_set

## Returns:

ResultSet result_set.