org.apache.nutch.tools
Interface PruneIndexTool.PruneChecker

All Known Implementing Classes:
PruneIndexTool.PrintFieldsChecker, PruneIndexTool.StoreUrlsChecker
Enclosing class:
PruneIndexTool

public static interface PruneIndexTool.PruneChecker

This interface can be used to implement additional checking on matching documents.

Author:
Andrzej Bialecki <ab@getopt.org>

Method Summary
 void close()
          Close the checker - this could involve flushing output files or somesuch.
 boolean isPrunable(Query q, IndexReader reader, int docNum)
          Check whether this document should be pruned.
 

Method Detail

isPrunable

boolean isPrunable(Query q,
                   IndexReader reader,
                   int docNum)
                   throws Exception
Check whether this document should be pruned. NOTE: this method MUST NOT modify the IndexReader.

Parameters:
reader - index reader to read documents from
docNum - document ID
Returns:
true if the document should be deleted, false otherwise.
Throws:
Exception

close

void close()
Close the checker - this could involve flushing output files or somesuch.



Copyright © 2006 The Apache Software Foundation