You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Daniel López <D....@uib.es> on 2006/12/07 15:09:40 UTC
Getting size and mime type info from Hits
Hi again,
I finally ignored the RTF and MP3 plugins and was able to compile Nutch
from scratch and then proceeded to create my own web search application.
I get it up and running and I'm now displaying the same information as
the "demo" search pages that come with Nutch. However, I'd like to be
able to show the size of the document behind a hit and it's mime type,
just to warn the user in case it does not want to display it.
I tried browing the API and play with HitDetails, but all I can get is
the title, url, summary and some doc/segment ids that are not useful for
the user.
Is there any way I can get this information?
Thanks,
D.
Re: Getting size and mime type info from Hits
Posted by Doğacan Güney <do...@agmlab.com>.
Daniel López wrote:
> Hi again,
>
> I finally ignored the RTF and MP3 plugins and was able to compile
> Nutch from scratch and then proceeded to create my own web search
> application.
>
> I get it up and running and I'm now displaying the same information as
> the "demo" search pages that come with Nutch. However, I'd like to be
> able to show the size of the document behind a hit and it's mime type,
> just to warn the user in case it does not want to display it.
>
> I tried browing the API and play with HitDetails, but all I can get is
> the title, url, summary and some doc/segment ids that are not useful
> for the user.
>
> Is there any way I can get this information?
>
>
> Thanks,
> D.
>
>
> .
>
If you add index-more filter to index, mime-type and content-length
should be available in HitDetails (via fields "primaryType", "subType"
and "contentLength").