[Xapian-discuss] Partial search on prefixed data

Sean McCleary sean.mccleary at gmail.com
Mon Aug 30 16:31:01 BST 2010

You guessed my problem.  Sorry; I don't feel too smart now.  :)

One more question: Is there no way to combine FLAG_PARTIAL and FLAG_PHRASE?

In this same auto-complete, let's say I have two possible results:

The Difference Engine
A World of Difference

When I type in "difference engine" _not_ as a phrase, then I get both of
those in my results.

But if I do it as a phrase, it only seems to search whole words, so having
entered "difference en" in the field gives me no results, even if
FLAG_PARTIAL is turned on.  Do these two flags not work together?

Thanks a lot,


On Sun, Aug 29, 2010 at 14:26, Olly Betts <olly at survex.com> wrote:

> On Sun, Aug 29, 2010 at 01:49:33AM +0200, Sean McCleary wrote:
> > However, FLAG_PARTIAL doesn't seem to work when searching with a prefix.
>  It
> > _does_ work when I remove the prefix, but then of course I don't get the
> > results that I'm after.
> >
> > Is this the desired behavior? If so, is there a way to do what I'm after?
> > Google and the docs haven't contained the answer for me thus far...
> There's test coverage for this case in queryparsertest, testcase
> qp_flag_partial1:
> http://trac.xapian.org/browser/trunk/xapian-core/tests/queryparsertest.cc#L929
> So it works in C++ (at least in a number of cases), and it seems unlikely
> this
> would be broken in the PHP wrappers.
> The only thing I can think of is if "name" is a boolean prefix perhaps?
> That's not supported with FLAG_PARTIAL (at least not currently).
> If it isn't that, can you show an actual testcase?
> Cheers,
>     Olly

More information about the Xapian-discuss mailing list