You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by maisonneuve nico <ni...@hotmail.com> on 2003/08/01 16:44:59 UTC
a different version of LuceneIndexTransformer ..
i made a different version of the LuceneIndexTransformer nearer to the
Lucene concepts
(more basic and flexible) based on the old LuceneIndexTransformer
Example of input source:
<page xmlns:lucene="http://apache.org/cocoon/lucene/1.0">
<lucene:index create="true"
analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer"
directory="d:/indexbase"
merge-factor="merge-factor">
<lucene:document>
<lucene:field name="tile" type="keyword">sqdqsdq</lucene:field>
<lucene:field name="description" type="text"> bla bal blalael balbal
</lucene:field>
<lucene:field name="date" type="date"
dateformat="MM/dd/yyyy">10/12/2002</lucene:field> (see java API Class
SimpleDateFormat for more explanation about the dateFormat attribut)
<lucene:field name="date" type="unstored" >just indexed information (not
stored)</lucene:field>
<lucene:field name="date" type="unindexed" >just stored information (not
indexed)</lucene:field>
</lucene:document>
<lucene:document>
<lucene:field name="author" type="keyword" boost="2">Mr
Author</lucene:field> (boost the field for the search (see Lucene
documentation)
<lucene:field name="langage" type="keyword">french</lucene:field>
</lucene:document>
</lucene:index>
<lucene:delete directory="d:/indexbase">
<lucene:document field="id" value="1E3RFE"/> //delete all documents with the
field id ="1E3RFE"
<lucene:document field="author" value="Mr Author"/>
</lucene:delete>
</page>
Example of Output Source :
<page xmlns:lucene="http://apache.org/cocoon/lucene/1.0">
<lucene:index nbdocuments="2"/>
<lucene:delete nbdocuments="1"/>
</page>
_________________________________________________________________
MSN Messenger 6 http://g.msn.fr/FR1001/866 : dialoguez en son et en image
avec vos amis.