[Xapian-discuss] trailing signed char in QueryParser

Sungsoo Kim kiss at imageclick.com
Mon Mar 6 17:58:47 GMT 2006


Dear Olly,

I have encountered an unexpected thing.
Please look at the following commands and results for test!

    $ python search.py -v C++
    Performing query 'Xapian::Query(c++:(pos=1))'
    0 results found

    $ python search.py -v c++
    Performing query 'Xapian::Query(c:(pos=1))'
    10 results found

I have known QueryParser looks up term list in the database
from the following code.

    // If the suffixed term doesn't exist, check that the
    // non-suffixed term does.  This also takes care of
    // the case when QueryParser::set_database() hasn't
    // been called.
    if (db.term_exists(suff_term) || !db.term_exists(term)) {
        term = suff_term;
        it = p;
    }

In my database the term 'c' exists, but 'C' doesn't exist.
All the terms are indexed in lowercase in my database,
because I knew QueryParser always changes terms to 
lowercase.

Why QP does not convert the term to lowercase before it 
calls db.term_exists() to look up term list?

Is there any reason I am not aware of?


For better Xapian,


Sungsoo Kim


More information about the Xapian-discuss mailing list