conf.set(IndexingFilters.INDEXINGFILTER_ORDER, class1);
IndexingFilters filters1 = new IndexingFilters(conf);
NutchDocument fdoc1 = filters1.filter(new NutchDocument(),new ParseImpl("text",new ParseData(
new ParseStatus(),"title",new Outlink[0],new Metadata())),new Text("http://www.example.com/"),
new CrawlDatum(),new Inlinks());
// add another index filter
String class2 = "org.apache.nutch.indexer.metadata.MetadataIndexer";
// set content metadata
Metadata md = new Metadata();
md.add("example","data");
// set content metadata property defined in MetadataIndexer
conf.set("index.content.md","example");
// add MetadataIndxer filter
conf.set(IndexingFilters.INDEXINGFILTER_ORDER, class1 + " " + class2);
IndexingFilters filters2 = new IndexingFilters(conf);
NutchDocument fdoc2 = filters2.filter(new NutchDocument(),new ParseImpl("text",new ParseData(
new ParseStatus(),"title",new Outlink[0],md)),new Text("http://www.example.com/"),
new CrawlDatum(),new Inlinks());
Assert.assertEquals(fdoc1.getFieldNames().size(),fdoc2.getFieldNames().size());
}