You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by philippe eugene <ph...@neuf.fr> on 2006/01/26 14:22:42 UTC

[Nutch 0.7.1]- Multi-Values for a Lucene Field

Hi,
Is it possible to have a field with multi-values using Nutch 0.7.1 ?

When i'm beginning with Lucene i made some test like this :
            doc.add(Field.Keyword("author", "author1"));
            doc.add(Field.Keyword("author", "author2"));
            doc.add(Field.Keyword("author", "author3"));

If I browse my Lucene Index using LUKE, i can see the three value for 
the field author.

Using Nutch 0.7.1, i made a very simplist recommended plugin for test 
purpose ( based on the tutorial : writing a plugin ) :

public Parse filter(Content content, Parse parse, HTMLMetaTags metaTags, 
DocumentFragment doc) {
    Log.info("Adding reco1");
    parse.getData().getMetadata().put(META_RECOMMENDED_NAME, "reco1");
    Log.info("Adding Reco 2");
    parse.getData().getMetadata().put(META_RECOMMENDED_NAME, "reco2");
    return parse;
}

My problem : When i browse the Lucene Index with Luke I just see the 
value "reco2".
Did somebody have an idea ?

Best Regards,
--
Philippe