Honour SearchIntpum_queryExpansion when generating summaries with snippets

This commit is contained in:
Ivan Skytte Jørgensen
2016-12-22 12:35:18 +01:00
parent 16e5fe6581
commit acdf780316
3 changed files with 5 additions and 1 deletions

@ -53,6 +53,8 @@ class Msg20Request {
// we now use the numeric collection # and not the ptr_coll
collnum_t m_collnum;
unsigned char m_queryExpansion :1;
unsigned char m_useQueryStopWords :1;
unsigned char m_highlightQueryTerms :1;
unsigned char m_getSummaryVector :1;
unsigned char m_showBanned :1;

@ -940,6 +940,8 @@ bool Msg40::launchMsg20s(bool recalled) {
req.m_getSummaryVector = true;
req.m_titleMaxLen = m_si->m_titleMaxLen;
req.m_summaryMaxLen = cr->m_summaryMaxLen;
req.m_queryExpansion = m_si->m_queryExpansion;
req.m_useQueryStopWords = m_si->m_queryExpansion; //SearchInput doesn't have a m_useQueryStopWords, but if they wanted synonyms (m_queryExpansion) then they probably also want stop words
// Line means excerpt
req.m_summaryMaxNumCharsPerLine = m_si->m_summaryMaxNumCharsPerLine;

@ -16928,7 +16928,7 @@ Query *XmlDoc::getQuery() {
int64_t start = logQueryTimingStart();
// return NULL with g_errno set on error
if ( !m_query.set2( m_req->ptr_qbuf, m_req->m_langId, true, true ) ) {
if ( !m_query.set2( m_req->ptr_qbuf, m_req->m_langId, m_req->m_queryExpansion, m_req->m_useQueryStopWords ) ) {
if(!g_errno)
g_errno = EBADENGINEER; //can fail due to a multitude of problems
return NULL;