[Xapian-tickets] [Xapian] #527: Eset unexpected behaviour
Xapian
nobody at xapian.org
Mon Jan 10 00:52:48 GMT 2011
#527: Eset unexpected behaviour
----------------------------+-----------------------------------------------
Reporter: fulltext | Owner: olly
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Search::Xapian | Version: 1.2.4
Severity: normal | Resolution: notabug
Keywords: | Blockedby:
Platform: All | Blocking:
----------------------------+-----------------------------------------------
Changes (by olly):
* status: new => closed
* resolution: => notabug
Comment:
This is the intended behaviour.
To filter the returned terms, you would ideally subclass
{{{Xapian::ExpandDecider}}} to specify the criteria for selecting terms to
return.
You set the component to Search::Xapian (i.e. the Perl bindings) but refer
to the PHP example, so I'm not sure which you are using.
If it's Perl, then you can pass a subroutine or anon sub for the decider,
e.g.:
{{{
#!perl
$enq->get_eset( 10, $rset, sub { $_[0] !~ /^[A-Z]/ } );
}}}
If it's PHP, then I'm afraid that currently such subclassing isn't
supported in PHP. The best workaround I can suggest there is to ask for
more terms than you want and filter the list returned (not ideal as Xapian
may have to do more work, and you may not get all the terms you want, but
I think it's the best you can do in PHP currently).
--
Ticket URL: <http://trac.xapian.org/ticket/527#comment:1>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list