Provides the function make_results if inherited by a search algorithm.
More...
#include <seqan3/search/detail/policy_search_result_builder.hpp>
Provides the function make_results if inherited by a search algorithm.
◆ make_results() [1/2]
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).
◆ make_results() [2/2]
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.
◆ make_results_impl()
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).
The documentation for this struct was generated from the following file: