case sensitivity: clause mod flags were lost on the way
This commit is contained in:
parent
166624f7f2
commit
48e9a4f901
2 changed files with 12 additions and 8 deletions
|
@ -169,6 +169,7 @@ static Rcl::SearchData *wasaQueryToRcl(RclConfig *config,
|
||||||
|
|
||||||
// "Regular" processing follows:
|
// "Regular" processing follows:
|
||||||
unsigned int mods = (unsigned int)(*it)->m_modifiers;
|
unsigned int mods = (unsigned int)(*it)->m_modifiers;
|
||||||
|
LOGDEB0(("wasaQueryToRcl: clause modifiers 0x%x\n", mods));
|
||||||
nclause = 0;
|
nclause = 0;
|
||||||
|
|
||||||
switch ((*it)->m_op) {
|
switch ((*it)->m_op) {
|
||||||
|
@ -180,7 +181,7 @@ static Rcl::SearchData *wasaQueryToRcl(RclConfig *config,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case WasaQuery::OP_LEAF: {
|
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_fieldspec.c_str(), (*it)->m_value.c_str(),
|
||||||
(*it)->m_slack));
|
(*it)->m_slack));
|
||||||
|
|
||||||
|
|
|
@ -666,8 +666,8 @@ void StringToXapianQ::expandTerm(int mods,
|
||||||
vector<string>& exp, string &sterm,
|
vector<string>& exp, string &sterm,
|
||||||
const string& prefix)
|
const string& prefix)
|
||||||
{
|
{
|
||||||
LOGDEB2(("expandTerm: field [%s] term [%s] stemlang [%s] nostemexp %d\n",
|
LOGDEB0(("expandTerm: mods 0x%x fld [%s] trm [%s] lang [%s]\n",
|
||||||
m_field.c_str(), term.c_str(), m_stemlang.c_str(), nostemexp));
|
mods, m_field.c_str(), term.c_str(), m_stemlang.c_str()));
|
||||||
sterm.clear();
|
sterm.clear();
|
||||||
exp.clear();
|
exp.clear();
|
||||||
if (term.empty())
|
if (term.empty())
|
||||||
|
@ -872,7 +872,7 @@ void StringToXapianQ::processSimpleSpan(const string& span,
|
||||||
int mods,
|
int mods,
|
||||||
vector<Xapian::Query> &pqueries)
|
vector<Xapian::Query> &pqueries)
|
||||||
{
|
{
|
||||||
LOGDEB2(("StringToXapianQ::processSimpleSpan: [%s] mods %x\n",
|
LOGDEB0(("StringToXapianQ::processSimpleSpan: [%s] mods 0x%x\n",
|
||||||
span.c_str(), (unsigned int)mods));
|
span.c_str(), (unsigned int)mods));
|
||||||
vector<string> exp;
|
vector<string> exp;
|
||||||
string sterm; // dumb version of user term
|
string sterm; // dumb version of user term
|
||||||
|
@ -1051,7 +1051,8 @@ bool StringToXapianQ::processUserString(const string &iq,
|
||||||
bool useNear
|
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();
|
ermsg.erase();
|
||||||
|
|
||||||
const StopList stops = m_db.getStopList();
|
const StopList stops = m_db.getStopList();
|
||||||
|
@ -1072,8 +1073,10 @@ bool StringToXapianQ::processUserString(const string &iq,
|
||||||
for (vector<string>::iterator it = phrases.begin();
|
for (vector<string>::iterator it = phrases.begin();
|
||||||
it != phrases.end(); it++) {
|
it != phrases.end(); it++) {
|
||||||
LOGDEB0(("strToXapianQ: phrase/word: [%s]\n", it->c_str()));
|
LOGDEB0(("strToXapianQ: phrase/word: [%s]\n", it->c_str()));
|
||||||
int mods = stringToMods(*it);
|
// Anchoring modifiers
|
||||||
int terminc = mods != 0 ? 1 : 0;
|
int amods = stringToMods(*it);
|
||||||
|
int terminc = amods != 0 ? 1 : 0;
|
||||||
|
mods |= amods;
|
||||||
// If there are multiple spans in this element, including
|
// If there are multiple spans in this element, including
|
||||||
// at least one composite, we have to increase the slack
|
// at least one composite, we have to increase the slack
|
||||||
// else a phrase query including a span would fail.
|
// else a phrase query including a span would fail.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue