[Xapian-discuss] Prefixes

James Aylett james-xapian at tartarus.org
Tue Jan 30 13:25:49 GMT 2007


On Tue, Jan 30, 2007 at 12:36:39PM +0800, Fabrice Colin wrote:

> >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?
>
> Yes, for a URL, quoting makes sense, but for a file name filter, not
> so much.  For instance, entering something like 'file:"My CV.txt"'
> is not completely unreasonable.
> 
> Actually, this would be useful for searching indexes built by
> omindex.  As far as I can tell it doesn't escape U-prefixed terms,
> so if a user wanted to find the document that has the term
> 'Uhttp://localhost/some file.txt', he would have to enter
> 'url:http://localhost/some%20file.txt', and the app would have to
> unescape the U-prefixed term in the Query object generated by the
> QueryParser.

'http://localhost/some file.txt' is not a valid URI; you MUST replace
the SPC with either '+' or '%20'. omindex may not be getting all of
this right, but it's the application's job rather than the user's.

('file:"My CV.txt"' is similarly not a valid URI. Again, the
application should be fixing things up somehow.)

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list