comments
This commit is contained in:
parent
ad6d3f4dd6
commit
80c1ab84a4
1 changed files with 13 additions and 10 deletions
|
@ -5,20 +5,23 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
/** Store about user terms and their expansions. This is used mostly for
|
/** Store data about user search terms and their expansions. This is used
|
||||||
* highlighting result text and walking the matches.
|
* mostly for highlighting result text and walking the matches, generating
|
||||||
|
* spelling suggestions.
|
||||||
*/
|
*/
|
||||||
struct HighlightData {
|
struct HighlightData {
|
||||||
/** The user terms, excluding those with wildcards.
|
/** The user terms, excluding those with wildcards. This list is
|
||||||
* This list is intended for orthographic suggestions but the terms are
|
* intended for orthographic suggestions so the terms are always
|
||||||
* unaccented lowercased anyway because they are compared to the dictionary
|
* lowercased, unaccented or not depending on the type of index
|
||||||
* generated from the index term list (which is unaccented).
|
* (as the spelling dictionary is generated from the index terms).
|
||||||
*/
|
*/
|
||||||
std::set<std::string> uterms;
|
std::set<std::string> uterms;
|
||||||
|
|
||||||
/** The original user terms-or-groups. This is for displaying the matched
|
/** The original user terms-or-groups. This is for display
|
||||||
* terms or groups, ie in relation with highlighting or skipping to the
|
* purposes: ie when creating a menu to look for a specific
|
||||||
* next match. These are raw, diacritics and case preserved.
|
* matched group inside a preview window. We want to show the
|
||||||
|
* user-entered data in the menu, not some transformation, so
|
||||||
|
* these are always raw, diacritics and case preserved.
|
||||||
*/
|
*/
|
||||||
std::vector<std::vector<std::string> > ugroups;
|
std::vector<std::vector<std::string> > ugroups;
|
||||||
|
|
||||||
|
@ -35,7 +38,7 @@ struct HighlightData {
|
||||||
|
|
||||||
/** Index into ugroups for each group. Parallel to groups. As a
|
/** Index into ugroups for each group. Parallel to groups. As a
|
||||||
* user term or group may generate many processed/expanded terms
|
* user term or group may generate many processed/expanded terms
|
||||||
* or groups, this is how we relate them
|
* or groups, this is how we relate an expansion to its source.
|
||||||
*/
|
*/
|
||||||
std::vector<unsigned int> grpsugidx;
|
std::vector<unsigned int> grpsugidx;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue