I must admit, I did not know there was an Index Manager 
Portlet until now ... thanks :-).

What I was trying to do was to index portlets content
with a daemon service. Maybe I did it wrong, so let me
explain what I did. 

The Indexer looked like this:

    public void index()
    {

                Portlet p;
        try
        {
            p = (Portlet) PortletFactory.getPortlet("GPHomeWelcome", "0");
                        Search.add(p);
        }
        catch (PortletException e)
        {
                        // log the error msg
                        Log.error("PortletIndexer: Unable to retrieve Portlet data." + 
e);
        } catch (InterruptedException e)
        {
                        // log the error msg
                        Log.error("PortletIndexer: Interrupted Sleep." + e);
        }
    }


first of all I got an CacheableStatefulPortletWrapper as
the resulting object. The object handler lookes like this:


   public ParsedObject parseObject(Object o)
    {
        ParsedObject result = new BaseParsedObject();

        if ((o instanceof CacheableStatefulPortletWrapper) == false)
        {
            Log.error("CacheableStatefulPortletWrapperToDocHandler: invalid object 
type: " + o);
            return null;
        }

                CacheableStatefulPortletWrapper portlet = 
(CacheableStatefulPortletWrapper) o;
        
                JetspeedRunDataService runDataService =(JetspeedRunDataService) 
TurbineServices.getInstance().getService(RunDataService.SERVICE_NAME);
                                                
        
result.setContent(portlet.getContent(runDataService.getCurrentRunData()).toString());
        result.setDescription(portlet.getDescription());

...        
        return result;
    }




This does not work, because the daemon thread has no rundata object and
runDataService.getCurrentRunData() returns no valid RunData Object.
To recreate the rundata from scratch seemed to be too complicated
because of the request and response objects.

To use the Index Manager action brings the same problems, because
I need a valid RunData object for the call.

I am not very deep into jetspeed, so maybe I am missing something...

Next topic: I need to index many languages (german, english) and I
don't know how to do this with the existing approach. It should
be possible to set the language within the RunData, so the portlets
will be rendered with the right language.

wouldn't it be a good idea, if the portlets itselves would be responsible
for gathering their data and returning it to the portal indexer. this
would be much better if you think about portlets that have more than 
one page OR if it comes to portlets as plugins like in jetspeed2. every
portlet specific code would be in one place than.


Regards, 
Joachim




> -----Ursprüngliche Nachricht-----
> Von: Jeremy Ford [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 25. Juli 2003 00:53
> An: Jetspeed Users List; [EMAIL PROTECTED]
> Betreff: Re: URGENT: infos jetspeed-lucene
> 
> 
> Two ideas off the top of my head which I have no idea whether they will
> work.
> 
> 1a)  Create an action like the Index Manager action.  Hopefully, you would
> have access to a valid rundata then.
> 
> 1b) Is there no valid rundata object if you use the index manager action to
> recreate the indexes?
> 
> 2)  Can you create your own RunData object on the fly. Could you derive from
> it and create a mockobject for your own use?
> 
> Jeremy
> 
> 
> ----- Original Message ----- 
> From: "Joachim Müller" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 23, 2003 9:12 AM
> Subject: AW: URGENT: infos jetspeed-lucene
> 
> 
> >
> > I did use it already and the existing approach has
> > proven very flexible. although there is one problem:
> >
> > having a harvester gathering all data for indexing
> > triggered by a daemon, it is AFAIK impossible to
> > index portlets. This is because the daemon process
> > has no request,response and no valid RunData, so
> > the portlet cannot build it's content.
> >
> > Therefore I put all necessary data into the database
> > and build the index straight from the database data.
> >
> > Maybe somebody has another idea?
> >
> >
> > joachim
> >
> >
> > Yakouben Laïd: ask me! ;-)
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Jeremy Ford [mailto:[EMAIL PROTECTED]
> > > Gesendet: Mittwoch, 23. Juli 2003 15:39
> > > An: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]
> > > Betreff: Re: URGENT: infos jetspeed-lucene
> > >
> > >
> > > Please direct future email to the jetspeed user's list.  The email
> address
> > > is [EMAIL PROTECTED]
> > >
> > > There is a new Lucene Search service.  Check out the packages
> > >
> > > org.apache.jetspeed.services.search
> > > org.apache.jetspeed.services.search.handlers
> > > org.apache.jetspeed.services.search.lucene
> > >
> > > You can add your own handlers through the JespeedResource.properties
> file.
> > >
> > > Jeremy Ford
> > >
> > >
> > > >From: Laïd YAKOUBEN <[EMAIL PROTECTED]>
> > > >To: [EMAIL PROTECTED]
> > > >Subject: Re: URGENT: infos jetspeed-lucene
> > > >Date: Wed, 23 Jul 2003 11:25:47 +0200 (CEST)
> > > >
> > > >What are the names of the files that I should pull
> > > >from CVS and where should I save it ?
> > > >Then, what should I configure ?
> > > >
> > > >Thanks a lot.
> > > >
> > > >Regards.
> > > >
> > > >
> > > >  --- Jeremy Ford <[EMAIL PROTECTED]> a écrit : >
> > > >Jetspeed has integrated Lucene in the CVS.  To see
> > > > > how it was done, please
> > > > > pull the src from CVS.
> > > > >
> > > > > Jeremy Ford
> > > > >
> > > > >
> > > > > >From: Laïd YAKOUBEN <[EMAIL PROTECTED]>
> > > > > >To: [EMAIL PROTECTED]
> > > > > >Subject: URGENT: infos jetspeed-lucene
> > > > > >Date: Tue, 22 Jul 2003 11:05:48 +0200 (CEST)
> > > > > >
> > > > > >Hello,
> > > > > >
> > > > > >I'm using jetspeed Version 1.4-b4, and I would like
> > > > > to
> > > > > >integrate lucene in jetspeed, could you help, it is
> > > > > >urgent for me, thanks a lot.
> > > > > >
> > > > > >Best regards.
> > > > > >
> > > > > >
> > > > > >Yakouben Laïd.
> > > > > >
> > > > >
> > > > >___________________________________________________________
> > > > > >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et
> > > > > en français !
> > > > > >Yahoo! Mail : http://fr.mail.yahoo.com
> > > > >
> > > > >
> > > >_________________________________________________________________
> > > > > Help STOP SPAM with the new MSN 8 and get 2 months
> > > > > FREE*
> > > > > http://join.msn.com/?page=features/junkmail
> > > > >
> > > >
> > > >___________________________________________________________
> > > >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> > > >Yahoo! Mail : http://fr.mail.yahoo.com
> > >
> > > _________________________________________________________________
> > > Tired of spam? Get advanced junk mail protection with MSN 8.
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> 
> 

Reply via email to