Make sure that a single double quoted word (single-word phrase) is not stem-expanded as this is unexpected
This commit is contained in:
parent
2882acaa43
commit
cbcefc1517
@ -808,9 +808,8 @@ bool SearchDataClauseSimple::processUserString(
|
|||||||
if (o_index_stripchars)
|
if (o_index_stripchars)
|
||||||
nxt = &tpprep;
|
nxt = &tpprep;
|
||||||
|
|
||||||
TextSplitQ splitter(TextSplit::Flags(TextSplit::TXTS_ONLYSPANS |
|
TextSplitQ splitter(TextSplit::Flags(
|
||||||
TextSplit::TXTS_KEEPWILD),
|
TextSplit::TXTS_ONLYSPANS | TextSplit::TXTS_KEEPWILD), nxt);
|
||||||
nxt);
|
|
||||||
tpq.setTSQ(&splitter);
|
tpq.setTSQ(&splitter);
|
||||||
splitter.text_to_words(wordorphrase);
|
splitter.text_to_words(wordorphrase);
|
||||||
|
|
||||||
@ -1074,6 +1073,11 @@ bool SearchDataClauseDist::toNativeQuery(Rcl::Db &db, void *p)
|
|||||||
}
|
}
|
||||||
string s = cstr_dquote + m_text + cstr_dquote;
|
string s = cstr_dquote + m_text + cstr_dquote;
|
||||||
bool useNear = (m_tp == SCLT_NEAR);
|
bool useNear = (m_tp == SCLT_NEAR);
|
||||||
|
if (!useNear) {
|
||||||
|
// We are a phrase query. Make sure to disable stemming explicitely in case this is a single
|
||||||
|
// quoted word because processUserString won't see it as a phrase by itself.
|
||||||
|
m_modifiers |= SDCM_NOSTEMMING;
|
||||||
|
}
|
||||||
if (!processUserString(db, s, m_reason, &pqueries, m_slack, useNear))
|
if (!processUserString(db, s, m_reason, &pqueries, m_slack, useNear))
|
||||||
return false;
|
return false;
|
||||||
if (pqueries.empty()) {
|
if (pqueries.empty()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user