mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-11 02:16:07 -04:00
Honour SearchIntpum_queryExpansion when generating summaries with snippets
This commit is contained in:
2
Msg20.h
2
Msg20.h
@ -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;
|
||||
|
Reference in New Issue
Block a user