forked from Mirrors/privacore-open-source-search-engine
Fix query "the" and "the" not matching all of the terms.
Stop words were supposed to be ignored but we were still trying to match them when looking for anomalous link text. This was causing all summaries to be rejected at query time causing a long wait for no results.
This commit is contained in:
committed by
Brian Rasmusson
parent
fd2ddc8c97
commit
4263920833
@ -1058,8 +1058,6 @@ bool Matches::docHasQueryTerms(int32_t totalInlinks) {
|
||||
continue;
|
||||
}
|
||||
numMatches[m->m_qwordNum] = m_numMatches;
|
||||
// log("match flag %x wordnum %"INT32 " totalinlinks:%"INT32,
|
||||
// m->m_flags, m->m_wordNum, totalInlinks);
|
||||
}
|
||||
|
||||
|
||||
@ -1069,10 +1067,11 @@ bool Matches::docHasQueryTerms(int32_t totalInlinks) {
|
||||
int32_t nqt = m_q->m_numTerms;
|
||||
for ( int32_t i = 0 ; i < nqt ; i++ ) {
|
||||
QueryTerm *qt = &m_q->m_qterms[i];
|
||||
// skip if ignored *in certain ways only*
|
||||
if ( ! isMatchableTerm ( qt ) ) {
|
||||
// For purposes of matching, we ignore all stop words
|
||||
if ( ! isMatchableTerm ( qt ) || qt->m_ignored) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// get the word it is from
|
||||
QueryWord *qw = qt->m_qword;
|
||||
|
||||
@ -1082,6 +1081,7 @@ bool Matches::docHasQueryTerms(int32_t totalInlinks) {
|
||||
hasTerms &= ((numMatches[qw->m_wordNum] >= m_numMatches) ||
|
||||
(numMatches[qw->m_wordNum] > 0 && totalInlinks < 10) ||
|
||||
(numMatches[qw->m_wordNum] > 2 && totalInlinks > 10));
|
||||
|
||||
}
|
||||
|
||||
if (numMatches != tmpBuf) {
|
||||
|
Reference in New Issue
Block a user