Xapian, omega and scriptindex version 1.0.3 from HEAD about a week ago. This is from omega FMT=godmode. 1 XRULERule_237 <http://picolex.com/cgi-bin/firelex/omega.cgi?DB=trial%2fsec&FMT=godmode&B=XRULERule%5f237> This is the code. my $query = "rule:Rule_237"; my $qp = new Search::Xapian::QueryParser(); $qp->set_stemmer(new Search::Xapian::Stem("english")); $qp->set_stemming_strategy(STEM_SOME); $qp->set_default_op($defaultop); $qp->add_boolean_prefix('rule','XRULE'); my $par = $qp->parse_query($query); my $enq = $db->enquire( $par ); print LOG "Running query ". $enq->get_query()->get_description()."\n";; I return no hits and the log reads: Running query Xapian::Query(XRULE:Rule_237) If I run a normal query for a word, it works as expected. This holds true for lots of examples of rule:, not just this one. I then used add_prefix and got closer: Running query Xapian::Query(XRULErule_237:(pos=1)) So I tried my $query = "rule:rule_237"; Running query Xapian::Query(ZXRULErule_237:(pos=1)) It was indexed with: rule : field boolean=XRULE So what did I do wrong? Thanks, Jim.
On Tue, Oct 30, 2007 at 08:35:11PM -0400, Jim wrote:> Xapian, omega and scriptindex version 1.0.3 from HEAD about a week ago. > > > This is from omega FMT=godmode. > 1 XRULERule_237Note that this will be parsed as prefix "XRULER" on term "ule_237". If you want to add an X-prefix to a term which starts with a capital letter, you need to insert a colon so it's clear where the prefix ends and the term begins, which is why the QueryParser generates this:> Running query Xapian::Query(XRULE:Rule_237)So scriptindex is wrong for not inserting a ':' in this case. Cheers, Olly