mime types, parsers, filters
"King, Stefan" <[email protected]>
| Newsgroups | gmane.comp.web.mnogosearch.general |
|---|---|
| Message-ID | <[email protected]> |
I am trying to set up search for a few million files. There are no web servers. It is very important that I be able to specify the type of document during search, so I have set up in indexer.conf to treat every recognizable mime type distinctly, For example, mime type text/plain is restricted to just .txt files. AddType text/plain *.txt while Java source is AddType text/x-java-source *.java so I added this : Mime text/x-java-source text/plain This caused the search terms to be recognized only if they were in the name of the java source file itself, not in the document body. So, I did this Mime text/x-java-source text/plain /bin/cat and reindexed the test directory, and now the search is able to see the java source code itself. So I have basically a trivial filter. However, it seems like I should not have to do this. My question is, Is there a way to tell mnogosearch to index a document as if it were mime type X even but store the attributes for the document as mime type Y? In this case I want mnogosearch to store java-source as the mime type but to index the document as text/plain otherwise. The "cat" trick does work, but I get the feeling I am missing something. I should not need an external parser at all. Where did I go wrong? Stefan