Anchored searches: remove unwarranted slack increase. The anchor term should behave like a normal one for slack computations

This commit is contained in:
Jean-Francois Dockes 2021-06-22 08:26:22 +02:00
parent e2ec06a612
commit d3d6394652

View File

@ -644,7 +644,6 @@ void SearchDataClauseSimple::processPhraseOrNear(
if (mods & Rcl::SearchDataClause::SDCM_ANCHORSTART) { if (mods & Rcl::SearchDataClause::SDCM_ANCHORSTART) {
orqueries.push_back(Xapian::Query(prefix + start_of_field_term)); orqueries.push_back(Xapian::Query(prefix + start_of_field_term));
slack++;
} }
// Go through the list and perform stem/wildcard expansion for each element // Go through the list and perform stem/wildcard expansion for each element
@ -691,7 +690,6 @@ void SearchDataClauseSimple::processPhraseOrNear(
if (mods & Rcl::SearchDataClause::SDCM_ANCHOREND) { if (mods & Rcl::SearchDataClause::SDCM_ANCHOREND) {
orqueries.push_back(Xapian::Query(prefix + end_of_field_term)); orqueries.push_back(Xapian::Query(prefix + end_of_field_term));
slack++;
} }
// Generate an appropriate PHRASE/NEAR query with adjusted slack // Generate an appropriate PHRASE/NEAR query with adjusted slack