[Xapian-discuss] Regular Expression Searching?
Olly Betts
olly at survex.com
Fri Feb 3 05:56:37 GMT 2006
On Tue, Jan 24, 2006 at 04:19:23PM -0500, jarrod roberson wrote:
> anyone have any suggestions on how to go about supporting regular expression
> searching with xapian?
Regular expressions and inverted-file keyword indexing don't really fit
together well. If you're after "grep with an index", then you probably
want something like glimpse which is suppose to be faster than grep,
but slower than an inverted-file keyword approach. But you get
approximate matching and regexp searching for that speed sacrifice.
If you just want to be able to search for terms matching a regexp
(the most common case is right-truncation - e.g. xap*) then you can
scan the database's termlist for terms which match the regexp and
build a query from such terms combined with OP_OR.
Cheers,
Olly
More information about the Xapian-discuss
mailing list