Page: http://wiki.cocoondev.org/Wiki.jsp?page=Transformer , version: 11 on Tue 
Jun 10 06:49:25 2003 by Con

+ * [LuceneIndexTransformer] -- creates Lucene indexes, for searching. 
Available in the Lucene block in C2.1.


Page: http://wiki.cocoondev.org/Wiki.jsp?page=LuceneIndexTransformer , version: 
1 on Tue Jun 10 06:46:15 2003 by Con

New page created:
+ LuceneIndexTransformer is a component that creates and updates Lucene 
indexes. These are the same indexes that the search generator searches.
+ 
+ NB [I|Con] am not the author of this transformer - in fact I haven't even 
used it yet (just downloading it now) but I'm starting to document it now. The 
following information has been derived from the source code.
+ 
+ !Input document for the LuceneIndexTransformer
+ 
+ I think this is the kind of document that the transformer expects
+ 
+ {{{
+ <!-- NB The attributes of the root element are shown with their -->
+ <!-- default values - see the Lucene documentation for explanations -->
+ <!-- of what they mean -->
+ 
+ <lucene:index xmlns:lucene="http://apache.org/cocoon/lucene/1.0"; 
+       analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer" 
+       directory="index" 
+       create="false" 
+       merge-factor="20">
+ 
+       <!-- Lucene will index the content of each lucene:document -->
+       <!-- and associate it with the url specified by the url -->
+       <!-- attribute. So this url will be returned as the results -->
+       <!-- of a search -->
+ 
+       <lucene:document url="http://localhost/sample.html";>
+ 
+               <!-- The content to be indexed goes here -->
+               <!-- If you want to index the attributes -->
+               <!-- of an element as well as its content, -->
+               <!-- add the attribute lucene:text-attr, -->
+               <!-- containing a list of the attributes -->
+               <!-- which you want indexed. -->
+ 
+               <!-- here is some sample content -->
+               <html>
+                       <head>
+                               <title>Sample</title>
+                       </head>
+                       <body>
+                               <h1>Blah</h1>
+                               <a href="blah.jpg" title="download blah image"
+                                       lucene:text-attr="title">
+                                       <img src="blah-small.jpg" alt="Blah"
+                                               lucene:text-attr="alt"/>
+                               </a>
+                       </body>
+               </html>
+       </lucene:document>
+       <lucene:document url="http://localhost/sample-2.html";>
+               <!-- Another sample doc -->
+               <html>
+                       <head>
+                               <title>Second Sample</title>
+                       </head>
+                       <body>
+                               <h1>Foo</h1>
+                               <p>Lorem ipsum dolor sit amet, 
+                               consectetuer adipiscing elit. </p>
+                       </body>
+               </html>
+       </lucene:document>
+ </lucene:index>
+ }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=BlockDescriptions , version: 29 
on Tue Jun 10 06:53:25 2003 by Con

- ''Provides the components needed to add full text search to your site.  See 
[Lucene| http://jakarta.apache.org/lucene/docs/index.html]''
?                                                                      ^  ^^

+ ''Provides the components needed to add full text search to your site, 
including the [LuceneIndexTransformer]. See also [the Lucene website| 
http://jakarta.apache.org/lucene/docs/index.html]''
?                                                                      ^ 
+++++++++ ^^        +++++++++++++++++++++++++++++++++++++++++++++++



Reply via email to