diff --git a/src/query/wasatorcl.cpp b/src/query/wasatorcl.cpp index 9b10cff9..c98ec553 100644 --- a/src/query/wasatorcl.cpp +++ b/src/query/wasatorcl.cpp @@ -169,6 +169,7 @@ static Rcl::SearchData *wasaQueryToRcl(RclConfig *config, // "Regular" processing follows: unsigned int mods = (unsigned int)(*it)->m_modifiers; + LOGDEB0(("wasaQueryToRcl: clause modifiers 0x%x\n", mods)); nclause = 0; switch ((*it)->m_op) { @@ -180,7 +181,7 @@ static Rcl::SearchData *wasaQueryToRcl(RclConfig *config, continue; case WasaQuery::OP_LEAF: { - LOGDEB(("wasaQueryToRcl: leaf clause [%s]:[%s] slack %d\n", + LOGDEB0(("wasaQueryToRcl: leaf clause [%s]:[%s] slack %d\n", (*it)->m_fieldspec.c_str(), (*it)->m_value.c_str(), (*it)->m_slack)); diff --git a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp index 6998c079..bddacf3f 100644 --- a/src/rcldb/searchdata.cpp +++ b/src/rcldb/searchdata.cpp @@ -666,8 +666,8 @@ void StringToXapianQ::expandTerm(int mods, vector& exp, string &sterm, const string& prefix) { - LOGDEB2(("expandTerm: field [%s] term [%s] stemlang [%s] nostemexp %d\n", - m_field.c_str(), term.c_str(), m_stemlang.c_str(), nostemexp)); + LOGDEB0(("expandTerm: mods 0x%x fld [%s] trm [%s] lang [%s]\n", + mods, m_field.c_str(), term.c_str(), m_stemlang.c_str())); sterm.clear(); exp.clear(); if (term.empty()) @@ -872,8 +872,8 @@ void StringToXapianQ::processSimpleSpan(const string& span, int mods, vector &pqueries) { - LOGDEB2(("StringToXapianQ::processSimpleSpan: [%s] mods %x\n", - span.c_str(), (unsigned int)mods)); + LOGDEB0(("StringToXapianQ::processSimpleSpan: [%s] mods 0x%x\n", + span.c_str(), (unsigned int)mods)); vector exp; string sterm; // dumb version of user term @@ -1051,7 +1051,8 @@ bool StringToXapianQ::processUserString(const string &iq, bool useNear ) { - LOGDEB(("StringToXapianQ:: query string: [%s], slack %d, near %d\n", iq.c_str(), slack, useNear)); + LOGDEB(("StringToXapianQ:: qstr [%s] mods 0x%x slack %d near %d\n", + iq.c_str(), mods, slack, useNear)); ermsg.erase(); const StopList stops = m_db.getStopList(); @@ -1072,8 +1073,10 @@ bool StringToXapianQ::processUserString(const string &iq, for (vector::iterator it = phrases.begin(); it != phrases.end(); it++) { LOGDEB0(("strToXapianQ: phrase/word: [%s]\n", it->c_str())); - int mods = stringToMods(*it); - int terminc = mods != 0 ? 1 : 0; + // Anchoring modifiers + int amods = stringToMods(*it); + int terminc = amods != 0 ? 1 : 0; + mods |= amods; // If there are multiple spans in this element, including // at least one composite, we have to increase the slack // else a phrase query including a span would fail.