template<typename search_configuration_t>
requires seqan3::detail::is_type_specialisation_of_v<search_configuration_t,
configuration>
struct seqan3::detail::policy_search_result_builder< search_configuration_t >
Provides the function make_results
if inherited by a search algorithm.
template<typename search_configuration_t >
template<typename index_cursor_t , typename query_index_t , typename callback_t >
Invoke the callback on all hits (index cursors) without calling locate on each cursor.
- Template Parameters
-
index_cursor_t | The type of index cursor used in the search algorithm. |
query_index_t | The index type of the query. |
callback_t | The callback which is called for every hit. |
- Parameters
-
[in] | internal_hits | internal_hits A range over internal cursor results. |
[in] | idx | The index associated with the current query. |
[in] | callback | The callback to invoke for every hit. |
The result is independent from the search modus (all, single_best, all_best, strata).
template<typename search_configuration_t >
template<typename index_cursor_t , typename query_index_t , typename callback_t >
requires
search_traits_type
Invokes the callback on each seqan3::search_result after calling locate on each cursor.
- Template Parameters
-
index_cursor_t | The type of index cursor used in the search algorithm. |
query_index_t | The index type of the query. |
callback_t | The callback which is called for every hit. |
- Parameters
-
[in] | internal_hits | internal_hits A range over internal cursor results. |
[in] | idx | The index associated with the current query. |
[in] | callback | The callback to invoke for every hit. |
This function is used for all search modi except single_best (which are all, all_best, and strata).
The text positions are sorted and made unique by position before invoking the callback on them.
template<typename search_configuration_t >
template<typename index_cursor_t , typename query_index_t , typename callback_t >
Invokes the callback on each seqan3::search_result and calls locate on the cursor depending on the config.
- Template Parameters
-
index_cursor_t | The type of index cursor used in the search algorithm. |
query_index_t | The index type of the query. |
callback_t | The callback which is called for every hit. |
- Parameters
-
[in] | internal_hits | internal_hits A range over internal cursor results. |
[in] | idx | The index associated with the current query. |
[in] | callback | The callback to invoke for every hit. |
For each cursor in internal_hits
, this function calls cursor.layz_locate()
if the search configuration requires it (search_traits_type::output_requires_locate_call) and then constructs a seqan3::search_result from the resulting data. The seqan3::search_result will be filled only with the data that was asked for by the user via the search_traits_type::output_[...]
trait (e.g. search_traits_type::output_query_id
).