[Xapian-discuss] Problem getting Xapian working with Burmese

Olly Betts olly at survex.com
Sun Aug 30 06:58:57 BST 2009

On Fri, Aug 21, 2009 at 02:44:44PM +0200, emmanuel at engelhart.org wrote:
> I want to update my request.
> Is my question bad formulated? too trivial? ... or maybe pretty
> complicated/unclear?

I think nobody answered as it was hard to follow your example because
the Burmese characters seem to have been mangled (at least the message I
received wasn't valid utf-8).

But looking at the code, I see an issue:

> my $db = Search::Xapian::Database->new( './xapdb' );
> my $enq = $db->enquire( $ARGV[0] );

What this does is to create an Enquire object and set Query($ARGV[0]) as
the query.  That works OK if $ARGV[0] is a single word which gets
indexed as a single term, but you really want to parse the query string
to get a Query object:

    my $db = Search::Xapian::Database->new( './xapdb' );
    my $queryparser = Search::Xapian::QueryParser->new();
    my $query = $queryparser->parse_query( $ARGV[0] );
    my $enq = $db->enquire( $query );

I'd guess that is probably your problem, but I can't tell for sure as I
can't test your examples...

For further information on debugging this sort of problem, see:



More information about the Xapian-discuss mailing list