You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jasper Michalczik <ja...@gmx.net> on 2004/05/18 19:24:49 UTC

searching xml

Hello everybody,

 

I have a couple of xml-files, that each contain besides other content a
list of vocabularies (2 languages). In order to search for a special
vocabulary entry in either language, I'm using the directory generator
to list all files in a directory, then the cinclude transformer to
aggregate the xml-files, and then an xsl:for-each with
test="contains(lang, $string)".

This way to do it works well but is extremely slow, because Cocoon
aggregates at the moment 34 files, each of which is about 1mb.

I tried the cached cinclude as well, but the "element"-attribute wasn't
recognized, and I couldn't see any performance gain.

 

Maybe it's just the totally wrong way to search in xml files. Any hints
are very welcome.

 

Thank you,

 

Jasper Michalczik


Re: searching xml

Posted by Stephan Coboos <cr...@gmx.net>.
Jasper Michalczik wrote:

>Hello everybody,
>
> 
>
>I have a couple of xml-files, that each contain besides other content a
>list of vocabularies (2 languages). In order to search for a special
>vocabulary entry in either language, I'm using the directory generator
>to list all files in a directory, then the cinclude transformer to
>aggregate the xml-files, and then an xsl:for-each with
>test="contains(lang, $string)".
>
>This way to do it works well but is extremely slow, because Cocoon
>aggregates at the moment 34 files, each of which is about 1mb.
>
>I tried the cached cinclude as well, but the "element"-attribute wasn't
>recognized, and I couldn't see any performance gain.
>
> 
>
>Maybe it's just the totally wrong way to search in xml files. Any hints
>are very welcome.
>  
>

You should have a look on Lucene and the SearchGenerator for example. 
(Very fast!)

More info:
Cococon samples: $COCOON_HOME/samples/lucene
http://cocoon.apache.org/2.1/userdocs/generators/generators.html
http://jakarta.apache.org/lucene

Regards
Stephan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org