Hi,

On 13 November 2014 09:13, Sebastian Nagel <[email protected]>
wrote:

> exclusion of DOM elements is not (yet) part of the Nutch
> package (1.9). You need to patch Nutch, see
>   https://issues.apache.org/jira/browse/NUTCH-585
>
>
You're absolutely right :-( By the age of the issue and the patch I
expected that it was already part of Nutch. I've been using patched
versions for "ages" and always use this feature to get rid of headers,
menus, footers and so on.


> Sebastian
>
> 2014-11-12 9:31 GMT+01:00 Jigal van Hemert | alterNET internet BV <
> [email protected]>:
>
> > On 11 November 2014 09:12, Moumita Dhar01 <[email protected]>
> > wrote:
> >
> > > Hi,
> > >
> > > I am using Nutch 1.9 and Solr 4.6 to index a web application with
> > > approximately 100 distinct  URL and contents.
> > >
> > > Nutch is used to fetch the urls, links and the crawl the entire web
> > > application to extract all the content for  all pages, and send the
> > content
> > > to  Solr.
> > >
> > > The problem that I have now is that the first 1000 or so characters and
> > > the last 400 or so characters of the pages which are common header and
> > > footer are showing up in the  search results.
> > >
> > > Is there a way  to ignore the links or keep only the static text in the
> > > content?
> > >
> >
> > You can exclude parts of the page before it's added to the index. In
> > nutch-site.xml you can put (example configuration, adjust to your
> > situation)
> >
> >   <property>
> >     <name>parser.html.NodesToExclude</name>
> >     <value></value>
> >     <description>
> >       A list of nodes whose content will not be indexed separated by "|".
> >       Use this to tell the HTML parser to ignore, for example, site
> > navigation text.
> >
> >       Each node has three elements, separated by semi-colon:
> >       the first one is the tag name,
> >       the second one the attribute name,
> >       the third one the value of the attribute.
> >
> >       Example: table;summary;header|div;id;navigation
> >
> >       Note that nodes with these attributes, and their children, will be
> >       silently ignored by the parser so verify the indexed content
> >       with Luke to confirm results.
> >     </description>
> >   </property>
> >
> > In the value part you add your configuration. The description part is
> just
> > to explain.
>

-- 


Met vriendelijke groet,


Jigal van Hemert | Ontwikkelaar



Langesteijn 124
3342LG Hendrik-Ido-Ambacht

T. +31 (0)78 635 1200
F. +31 (0)848 34 9697
KvK. 23 09 28 65

[email protected]
www.alternet.nl


Disclaimer:
Dit bericht (inclusief eventuele bijlagen) kan vertrouwelijke informatie
bevatten. Als u niet de beoogde ontvanger bent van dit bericht, neem dan
direct per e-mail of telefoon contact op met de verzender en verwijder dit
bericht van uw systeem. Het is niet toegestaan de inhoud van dit bericht op
welke wijze dan ook te delen met derden of anderszins openbaar te maken
zonder schriftelijke toestemming van alterNET Internet BV. U wordt
geadviseerd altijd bijlagen te scannen op virussen. AlterNET kan op geen
enkele wijze verantwoordelijk worden gesteld voor geleden schade als gevolg
van virussen.

Alle eventueel genoemde prijzen S.E. & O., excl. 21% BTW, excl. reiskosten.
Op al onze prijsopgaven, offertes, overeenkomsten, en diensten zijn, met
uitzondering van alle andere voorwaarden, de Algemene Voorwaarden van
alterNET Internet B.V. van toepassing. Op al onze domeinregistraties en
hostingactiviteiten zijn tevens onze aanvullende hostingvoorwaarden van
toepassing. Dit bericht is uitsluitend bedoeld voor de geadresseerde. Aan
dit bericht kunnen geen rechten worden ontleend.

! Bedenk voordat je deze email uitprint, of dit werkelijk nodig is !

Reply via email to