in reply to how to parse a query

I don't know whether this is relevant, but you might look at KinoSearch -- at least for ideas. Basically, you need some sort of process that will read through your set of documents and build an index to identify all the locations of all possible keywords. Then you need a separate query process that knows how to read the index data, and how to use the information provided there to locate the specific documents that meet specific conditions on particular keywords.

A database solution would probably work okay, but people have built "search engine" apps that are better optimized for this kind of task. KinoSearch (which I personally have not used) is one such engine, built with Perl and C.

Replies are listed 'Best First'.
Re^2: how to parse a query
by bart (Canon) on Oct 16, 2006 at 10:42 UTC
    If you want help with KinoSearch, because a huge package like that can be very daunting at first, its author, creamygoodness, is a regular here. You can find him in the Chatterbox, typically several times a week.

      ... and it would be nice to be able to give back something for all the Chatterbox help bart has given me.

      The path for getting started with KinoSearch is to copy and paste the sample code in KinoSearch::Docs::Tutorial and adapt it for your needs.

      I think graff has correctly divined that you're in need of a search engine library rather than a standalone search query parser. Nevertheless, for the sake of completeness, another CPAN module specifically dedicated to that task is Search::QueryParser.

      --
      Marvin Humphrey
      Rectangular Research ― http://www.rectangular.com