hldata: matchGroup: return false if no match found
This commit is contained in:
parent
63cfcf0ad5
commit
c588fddb83
@ -206,7 +206,7 @@ bool matchGroup(const HighlightData& hldata,
|
|||||||
orplists.back().addplist(pl->first, &(pl->second));
|
orplists.back().addplist(pl->first, &(pl->second));
|
||||||
}
|
}
|
||||||
if (orplists.back().plists.empty()) {
|
if (orplists.back().plists.empty()) {
|
||||||
LOGINF("No positions list found for group " <<
|
LOGRP("No positions list found for group " <<
|
||||||
stringsToString(group) << std::endl);
|
stringsToString(group) << std::endl);
|
||||||
orplists.pop_back();
|
orplists.pop_back();
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ bool matchGroup(const HighlightData& hldata,
|
|||||||
// I think this can't actually happen, was useful when we used to
|
// I think this can't actually happen, was useful when we used to
|
||||||
// prune the groups, but doesn't hurt.
|
// prune the groups, but doesn't hurt.
|
||||||
if (orplists.size() < 2) {
|
if (orplists.size() < 2) {
|
||||||
LOGINF("TextSplitPTR::matchGroup: no actual groups found\n");
|
LOGRP("TextSplitPTR::matchGroup: no actual groups found\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ bool matchGroup(const HighlightData& hldata,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return !tboffs.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
string HighlightData::toString() const
|
string HighlightData::toString() const
|
||||||
|
|||||||
@ -86,7 +86,8 @@ struct GroupMatchEntry {
|
|||||||
|
|
||||||
// Find NEAR matches for one group of terms.
|
// Find NEAR matches for one group of terms.
|
||||||
//
|
//
|
||||||
// @param hldata User query expansion descriptor (see above).
|
// @param hldata User query expansion descriptor (see above). We only use
|
||||||
|
// the index_term_groups entry
|
||||||
//
|
//
|
||||||
// @param grpidx Index in hldata.index_term_groups for the group we
|
// @param grpidx Index in hldata.index_term_groups for the group we
|
||||||
// process. This is used by us to get the terms and slacks, and
|
// process. This is used by us to get the terms and slacks, and
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user