You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Josias Thöny <jo...@wyona.com> on 2006/03/24 16:13:53 UTC

lucene index configuration

Hi,

I have made some changes about the lucene search index configuration.
Now the indexes of a publication are configured in the file
pubid/config/lucene_index.xconf

This is not an xpatch file anymore, which means the configuration won't
go into cocoon.xconf. This allows creation of new indexes at runtime,
i.e. when a new publication is instantiated.

For existing publications which use lucene search, you have to remove
the pubid/config/cocoon-xconf/index_manager_index.xconf file and add
pubid/config/lucene_index.xconf.
See the default pub for an example.

Please let me know if there are any problems.

There are still open issues about lucene search, e.g. it still uses the
exit-usecase to trigger indexing. 

Josias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: lucene index configuration

Posted by Josias Thöny <jo...@wyona.com>.
On Fri, 2006-03-24 at 17:37 +0100, Andreas Hartmann wrote:
> Josias Thöny wrote:
> > On Fri, 2006-03-24 at 16:38 +0100, Andreas Hartmann wrote:
> >> Josias Thöny wrote:
> > [...] 
> >>> There are still open issues about lucene search, e.g. it still uses the
> >>> exit-usecase to trigger indexing. 
> >> JCR provides an observation mechanism, I guess we need something
> >> similar for documents (e.g., to trigger the indexing).
> > 
> > +1
> > Do you have an idea how the triggering could work?
> > 
> > Maybe changing the content of documents should happen behind the Lenya
> > API,
> 
> +1
> 
>  > something like
> > 
> > document.save(inputStream)
> >  or
> > documentManager.saveDocument(document, inputStream)
> 
> The new repository API draft provides a method
> 
>    Translation.getOutputStream()
> 
> 
> The notification could take place in the stream's close() method:
> 
>    class DocumentOutputStream extends ByteArrayOutputStream {
> 
>          public void close() throws IOException {
>              ...
>              notifyListeners();
>          }
>    }

Sounds good, this makes sense.
So we have to integrate the new API first, right?

Josias

> 
> 
> > (it would read the inputstream and write it into the document)
> > 
> > then the document or the documentManager could notify any "document
> > change listeners".
> > Or would that be the job of each individual code block which changes
> > documents, like e.g. OneFormEditor.java?
> 
> No, I don't think that would be a good idea.
> 
> -- Andreas
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: lucene index configuration

Posted by Andreas Hartmann <an...@apache.org>.
Josias Thöny wrote:
> On Fri, 2006-03-24 at 16:38 +0100, Andreas Hartmann wrote:
>> Josias Thöny wrote:
> [...] 
>>> There are still open issues about lucene search, e.g. it still uses the
>>> exit-usecase to trigger indexing. 
>> JCR provides an observation mechanism, I guess we need something
>> similar for documents (e.g., to trigger the indexing).
> 
> +1
> Do you have an idea how the triggering could work?
> 
> Maybe changing the content of documents should happen behind the Lenya
> API,

+1

 > something like
> 
> document.save(inputStream)
>  or
> documentManager.saveDocument(document, inputStream)

The new repository API draft provides a method

   Translation.getOutputStream()


The notification could take place in the stream's close() method:

   class DocumentOutputStream extends ByteArrayOutputStream {

         public void close() throws IOException {
             ...
             notifyListeners();
         }
   }


> (it would read the inputstream and write it into the document)
> 
> then the document or the documentManager could notify any "document
> change listeners".
> Or would that be the job of each individual code block which changes
> documents, like e.g. OneFormEditor.java?

No, I don't think that would be a good idea.

-- Andreas



-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: lucene index configuration

Posted by Josias Thöny <jo...@wyona.com>.
On Fri, 2006-03-24 at 16:38 +0100, Andreas Hartmann wrote:
> Josias Thöny wrote:
[...] 
> > There are still open issues about lucene search, e.g. it still uses the
> > exit-usecase to trigger indexing. 
> 
> JCR provides an observation mechanism, I guess we need something
> similar for documents (e.g., to trigger the indexing).

+1
Do you have an idea how the triggering could work?

Maybe changing the content of documents should happen behind the Lenya
API, something like

document.save(inputStream)
 or
documentManager.saveDocument(document, inputStream)

(it would read the inputstream and write it into the document)

then the document or the documentManager could notify any "document
change listeners".
Or would that be the job of each individual code block which changes
documents, like e.g. OneFormEditor.java?

WDYT?

Josias

> 
> -- Andreas
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: lucene index configuration

Posted by Andreas Hartmann <an...@apache.org>.
Josias Thöny wrote:
> Hi,
> 
> I have made some changes about the lucene search index configuration.
> Now the indexes of a publication are configured in the file
> pubid/config/lucene_index.xconf
> 
> This is not an xpatch file anymore, which means the configuration won't
> go into cocoon.xconf. This allows creation of new indexes at runtime,
> i.e. when a new publication is instantiated.

Cool, thanks a lot!


> For existing publications which use lucene search, you have to remove
> the pubid/config/cocoon-xconf/index_manager_index.xconf file and add
> pubid/config/lucene_index.xconf.
> See the default pub for an example.
> 
> Please let me know if there are any problems.
> 
> There are still open issues about lucene search, e.g. it still uses the
> exit-usecase to trigger indexing. 

JCR provides an observation mechanism, I guess we need something
similar for documents (e.g., to trigger the indexing).

-- Andreas

-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org