in reply to Re: Google-like query of ASCII text with Text::Query or other modules
in thread Google-like query of ASCII text with Text::Query or other modules
Alas, they're in one large text file. I work at a university. Basically, I've got a 5MB text file containing thousands of paragraphs, each of which is a description of a different course. I want students to be able to search this catalog, and I want their results to be the full text of all matching paragraphs.
Right now, I handle this by using a regex to search each paragraph, returning to the user every paragraph that matches the query. The file is searched each time, so this is quite inefficient. As Tanktalus suggests below, I'd be better off if these descriptions were already in a database. But there's no question that this particular project isn't worth the time I would need to do that.
Of course, using a database would also permit the students to run more powerful queries, which is what I'd really like to do. My main concern at this point is not the efficiency of the search (which isn't terribly slow as it is), but improving the query capabilities.