<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Olly Betts wrote:
<blockquote cite="mid20070614121342.GR9072@survex.com" type="cite">
<pre wrap="">On Wed, Jun 13, 2007 at 10:07:34PM -0700, Alexander Lind wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Is there a good way to generate search term suggestions meant for the
user to see? I was thinking using the relevance set and expansion set
stuff for this, but since these functions return a lot of Z-prefixed
stemmed down versions of words, those results are not always suitable to
be presented to the user.
</pre>
</blockquote>
<pre wrap=""><!---->
Just use an ExpandDecider subclass which returns false if the term
starts with a 'Z'. Something like this:
class MyExpandDecider : public Xapian::ExpandDecider {
        MyExpandDecider() {}
        bool operator(const string &) const;
};
bool
MyExpandDecider::operator()(const string & term) const
{
        return term[0] != 'Z';
}
</pre>
</blockquote>
Ah, perfect. Shall implement.<br>
<br>
Cheers<br>
Alec<br>
<blockquote cite="mid20070614121342.GR9072@survex.com" type="cite">
<pre wrap="">
Cheers,
Olly
</pre>
</blockquote>
</body>
</html>