Re: need wisdom

Alexander Barkov <[email protected]>
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Hi, Stefan,

King, Stefan wrote:
> I have been working with mnogosearch for two months.
> 
> I want to be able to search a repository of files with it.  I don’t want 
> to index any websites.
> 
> I have made reasonable progress, but I have found the requirements for 
> indexing files are
> 
> quite different from those for indexing websites, and I would like some 
> general guidance about
> 
> how to alter the configuration to be more effective.
> 
>  
> 
> Sorry if the questions seem naïve.
> 
>  
> 
> One of the most important things when searching for a file is the kind 
> of file it is.
> 
> Usually one knows this.  I would like to get the indexer to store 
> information about the file
> 
> extension so it can be part of the query. 
> 
>  
> 
> It seems I should be able to harness existing mime types somehow.
> 
> Presently, I am using a battery of filters to convert everything to 
> plain text with configurations
> 
> like the following:
> 
>  
> 
> Mime application/pdf          text/plain                 
> "/usr/local/filters/bin/pdftotext  -enc UTF-8 -q $1 -"
> 
>  
> 
> Of course, by the time mnogo sees it, it really is text, and I told it 
> it was text, so I don’t see how
> 
> the engine can help me look for .pdf files at that point.
> 
>  
> 
> So I am thinking I should be able to somehow add an attribute to the 
> item that is the file extension
> 
> or else the real mime type, as just about every different type of file 
> has a unique one.
> 
>  
> 
> How can I add this information such that someday I can build a search 
> page where I can specify that
> 
> I want to limit my search to .pdf files?
> 
>  
> 
> I think I can’t just use the same filter and change the mime type above 
> to application/pdf. 
> 
> What is the best approach to this?

You can use the "Section Content-Type" command in indexer.conf,
for example:

Section Content-Type            12      64

Then at search time you can limit searches for certain file types only,
with help of the "type" HTML form variable.

For example:

http://yoursite/search.cgi?q=test&type=application/pdf

will search for the word "test" in PDF documents only.



Have a look here for more information on search patameters:
http://www.mnogosearch.org/doc33/msearch-doingsearch.html#search-params



> 
> Thanks
> 
> 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.