Strange... Here is the quoted, unedited, partially incorrect post... ;-)
"I would say that the best thing to do is to create a new nutch bean.
I never cared much for the nutch bean containing logic to store itself
in a servlet context. I do not believe that this is the place for
such logic. It should be up to the user to place the nutch bean into
the servlet context and not the bean. My implementation of a "nutch
bean" has no knowledge of a servlet context and I believe this
dependency should be removed. Why should nutch care about such
details?
Anyway, enough with my tiny rant.
You could just create a 'reload.jsp' (or any servlet, or whatever you
want that can get ahold of the servlet context) and do the work...
The current way nutch finds an instance of the search bean is within
the static method
get(ServletContext, Configuration) within the NutchBean class.
So, in your java class, jsp or whatever, just replace the instance
with something like:
servletContext.setAttribute("nutchBean", new NutchBean(yourConfiguration));
Hope that gets you on your way.
You could always edit, or subclass the nutch bean with a
'reload/reinit' method too that could just do the same thing."
On 6/20/07, Naess, Ronny <[EMAIL PROTECTED]> wrote:
> Thanks, Briggs.
>
> I will try to create a new NutchBean to se if that solves reloading
> issue.
>
> By the way. Your former mail do not seem to have reached the
> mailinglist. I can't seem to find it anyway.
>
> -Ronny
>
> -----Opprinnelig melding-----
> Fra: Briggs [mailto:[EMAIL PROTECTED]
> Sendt: 20. juni 2007 01:22
> Til: [EMAIL PROTECTED]
> Emne: Re: Reload index
>
> By the way, I was wrong about one thing, you can't override the 'get'
> method of nutch bean because it's static. Doh, that was a silly
> oversight.
>
> But again, if you are using nutch and you need to 'reload' the index,
> you need only to create a new NutchBean (that is if the NutchBean is
> what you are using).
>
> On 6/19/07, Naess, Ronny <[EMAIL PROTECTED]> wrote:
> > This will reload the application, is'nt this correct? This is
> > something I do not want as spesified below.
> >
> > Is it possible to maybe manupulate the IndexReader part of the nutch
> > web client to read whenever i tell it to, or something like that?
> >
> > Or do I have to write my own client bottom up?
> >
> > Regards,
> > Ronny
> >
> > -----Opprinnelig melding-----
> > Fra: Susam Pal [mailto:[EMAIL PROTECTED]
> > Sendt: 18. juni 2007 17:33
> > Til: [EMAIL PROTECTED]
> > Emne: Re: Reload index
> >
> > touch $CATALINA_HOME/ROOT/webapps/WEB-INF/web.xml
> >
> > $CATALINA_HOME is the top level directory of Tomcat. It works for most
>
> > cases.
> >
> > Regards,
> > Susam Pal
> > http://susam.in/
> >
> > On 6/18/07, Naess, Ronny <[EMAIL PROTECTED]> wrote:
> > >
> > > Is there a way to reload index without restarting application server
>
> > > or reloading application?
> > >
> > > I have integrated Nutch into our app but we can not restart or
> > > reload the app everytime we have created a new index.
> > >
> > >
> > > Regards,
> > > Ronny
> > >
> >
> >
> >
> >
>
>
> --
> "Conscious decisions by conscious minds are what make reality real"
>
> !DSPAM:46786552232131573131950!
>
>
--
"Conscious decisions by conscious minds are what make reality real"
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general