(I meant Unusual)
Anyway, my plugin will examine the url, make a decision, and then
conditionally add a field to the index. Considering this required plugin
method, I will pass in a Documetn and url, check the Document after the
method call, and see if it all works. The, I'll just assume it will work
integrated. I don't learn as much, but oh well.
public Document filter(Document doc, Parse parse, Text url, CrawlDatum
datum, Inlinks inlinks)
On Wed, Apr 30, 2008 at 5:33 PM, Gene Campbell <[EMAIL PROTECTED]>
wrote:
> This is an usual case then. I was hoping to get a deeper understanding of
> Nutch and Lucene that way, rather not to be told I shouldn't do something.
>
>
> On Wed, Apr 30, 2008 at 5:17 PM, Iskandar Zaynutdinov <
> [EMAIL PROTECTED]> wrote:
>
> > Usually you needn't to write unit test just to test whether your plug-in
> > gotten called and does something good. You must have fine grained
> > predicates
> > for unit test. Don't test it's not giving exception. If your plug-in
> > have
> > some heavy logic, very subject to test....
> > You have to separate this logic and test it without lucene. Otherwise
> > you
> > will be testing lucene!
> >
> > Unit test is such sort of test where only and only one class(I am not
> > counting mocks) to be executed.
> >
> > On Wed, Apr 30, 2008 at 10:07 AM, Gene Campbell <[EMAIL PROTECTED]
> > >
> > wrote:
> >
> > > Is there an example somewhere of creating an index with a jUnit test
> > > class?
> > > I've created a IndexingFilter plugin, and would like to unit test it.
> > I
> > > need to run code
> > > that will try index something, so I can see if my plugin gets called
> > and
> > > does something
> > > good.
> > >
> >
>
>