Swish supports indexing arbitrary items, not just files. If you disect the innerts of SWISH::API::Common, you'll see that it puts a 'streamer' into swish's config file.
The 'streamer' is a program that prints out the text data that's supposed to be indexed, plus some meta data. Check out the file_stream method in SWISH::API::Common:
print "Path-Name: $file\n",
"Document-Type: TXT*\n",
"Content-Length: $size\n\n";
print $data;
So, unless you want to put your text snippets into files, there'll be some additional work involved, but it should be easy.
|