[KinoSearch] Wildcards

Nathan Kurz nate at verse.com
Fri Jan 25 12:32:25 PST 2008



On 1/25/08, Father Chrysostomos <sprout at cpan.org> wrote:
> On Jan 25, 2008, at 2:28 AM, Marvin Humphrey wrote:
>
> > However any particular WildcardQuery gets implemented, it will need
> > some sort of safety valve to prevent "a*" from swamping the server.
>
> You mean like this?
>
> KSx::Search::RegexpQuery->new(
>      re => qr/^foo.*/,
>      field => 'content',
>      max_terms => 1024,

While one could do this, if the goal is to be a safety valve you might
this check to be enforced at the core Boolean level instead of by each
extension.

But my instinct would to figure out a way simply make the search work,
rather than throwing it out as an exception.  Supporting a search for
"a* lovelace" seems reasonable, and shouldn't actually be that
expensive if implemented lazily.

If one was to have a limit, it should probably be on the total length
of the records that need to be searched, not on the number of terms
involved.

Nathan Kurz
nate at verse.com

_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch




More information about the kinosearch mailing list