Hi, my snippets collection is getting kind of large, and my old method of letting Perl grep through all the files is getting slow and "hard drive intensive". So I have a preliminary design using
swish++ and then dumping the files returned from swish into a Tk listbox, and then you can browse the file with the search word highlighted.
So I figure this has been done before, and was wondering if there are better ways. (Before I get too deep into it :-)
The only drawbacks I see is swish++ likes to ignore alot of short common words, which are Perl keywords...like for, if ,etc; and it is limited to single word searches.
So has anyone else found a method which can limit the search to 1 file, like swish++ ?
My first inclination was just to "cat" all the files together in a big text file, and just search it. But then what would be the best way to compress and search it, retaining the original filenames?
My intuition tells me I want to convert the text to some compressed binary reperesentation, to make the searching faster, and the file smaller.
So I would appreciate any ideas and pointers which anyone may have.(before I go sailing off in the wrong direction :-) ) TIA
I'm not really a human, but I play one on earth.
flash japh
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.