Hi Stefan,

You can use the Lucene crawler to index your site. (Look at the Lucene sample)
Within the cocoon.xconf you can declare wich document element should be stored by the LuceneIndexer.


For example:

<component role="org.apache.cocoon.components.search.LuceneXMLIndexer"
class="org.apache.cocoon.components.search.SimpleLuceneXMLIndexerImpl"
logger="core.search.lucene">
<store-fields>title</store-fields>
</component>


The title element will be stored by the LuceneIndexer. Once your crawler is finished you can call the search generator for the output.

For example:

Add this to your sitemap:

<map:match pattern="search">
 <map:generate type="search" label="content"/>
 <map:serialize type="xml"/>
</map:match>

Get the output with http://yourserver.com/search?queryString=and

This will search the word 'and' in all your documents.

Looking at the output generated by the searchgenerator you will see your element is returned.

I hope this helps a bit.

Greetz,

Jeroen




Stefan Geelen schreef:


HI,

I noteiced in the SimpleLuceneXMLIndexerImpl class that there is a <store-fields> parameter to define which content

Quote:

* <p>
* <tt>&lt;store-fields/&gt;</tt>
* Sets which tags in your content are stored in Lucene as fields,
* during the indexing process. Allows them to be output with search hits.
* </p><p>


Now my question is how can I get these fields to be output with search hits ?

This is not clear to me and I can't find any documentation about that.

Anyone ?

Regards,

Stefan

_________________________________________________________________
MSN Search, for relevant search results! http://search.msn.be


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to