in reply to Search engine query parsing

If you can use Text::Balanced, why can't you use one of the many search engine modules on CPAN, like Search::InvertedIndex or DBIx::FullTextSearch? That would be a lot simpler.

Replies are listed 'Best First'.
Re: Re: Search engine query parsing
by Hero Zzyzzx (Curate) on Aug 16, 2001 at 07:36 UTC

    You know, I've just started to give DBIx::FullTextSearch a real chance, and I'm playing around with it. Part of the issue is that I'm indexing legal documents, and the lawyers want a high level of search functionality- including boolean operators, searches by date, category, author, etc. and I'm just afraid that DBIx::FullTextSearch isn't going to cut it.

    -Any sufficiently advanced technology is
    indistinguishable from doubletalk.

      Hmmm... if you need field-based searching, you could combine a text search like this with some simple field-based searching, maybe in MySQL or a DBM file (for indexing keys to documents). Or maybe you could do multiple searches for the nested conditions and combine the answers. DBIx::FullTextSearch does support a pretty fancy syntax, although not quite as fancy as what you're talking about.

      If you need to write your own parser, try Parse::RecDescent or Parse::Tokens.