RE: mime types, parsers, filters

"King, Stefan" <[email protected]>
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Thank you.  Anyway, I guess I could at least use dd which I think is
more 
efficient.  Now on to clustering...

-----Original Message-----
From: Alexander Barkov [mailto:[email protected]] 
Sent: Tuesday, March 09, 2010 10:29 AM
To: King, Stefan
Cc: [email protected]
Subject: Re: mime types, parsers, filters

Hi Stefan,

King, Stefan wrote:
> 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?


Using /bin/cat is the correct way.

Empty command line parameter (to do Mime type "cast", without any 
program execution) is not supported.




> 
>  
> 
> Stefan
> 
>  
> 
>  
> 
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.