[Xapian-discuss] Prefixes

Olly Betts olly at survex.com
Tue Jan 30 03:09:52 GMT 2007


On 26/01/07, Fabrice Colin <fabrice.colin at gmail.com> wrote:
> I am using QueryParser::add_boolean_prefix("url", "U") to restrict searches to
> documents that have a specific URL.
> When the input has a URL containing a space, how should it be quoted ?

There isn't currently a way to quote such a prefixed boolean term, but
shouldn't spaces be quoted as %20 in a url anyway?

> This leads me to a second question. At indexing time, long URLs are hashed just
> like what omindex does with hash_long_term(). Because of this, the QueryParser
> will always generate the wrong term when its input has a filter on one of these
> long URLs. Would it be possible to have something like the following ?
>
> void Xapian::QueryParser::add_boolean_prefix(
> const std::string &field,
> const std::string &prefix,
> const TermTransformer *transform);

Perhaps, though for this case it seems unlikely that a user would
really type in a 240+ character URL...

Cheers,
    Olly



More information about the Xapian-discuss mailing list