Hi

>
> <search:results xmlns:search="http://apache.org/cocoon/search/1.0>
>  <search:hit rank="1" score="89%" uri="..."/>
>  ...
> </search:results>
>
>
A SearchGenerator:

(1) Configure the sitemap:
sitemap:
  <map:generator name="search"
    src="org.apache.cocoon.generation.SearchGenerator"
    label="content"/>
(2) add a pipeline:
    <map:match pattern="findIt">
      <map:generate type="search"/>
      <map:transform src="search2html.xsl"/>
      <map:serialize/>
    </map:match>

SearchGenerator xml-result:

<search:results date="1007927822501" query-string="&quot;xml parser&quot;"
  start-index="0" page-length="10" 
  xmlns:search="http://apache.org/cocoon/search/1.0"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
<search:hits  total-count="8">
<search:hit rank="0" score="0.8534519" 
uri="http://localhost:8080/cocoon/documents/installing/jars.html"/>
<search:hit rank="1" score="0.8534519" 
uri="http://localhost:8080/cocoon/documents/installing/jars.html"/>
<search:hit rank="2" score="0.80464226" 
uri="http://localhost:8080/cocoon/documents/plan/catalog.html"/>
<search:hit rank="3" score="0.7040619" 
uri="http://localhost:8080/cocoon/documents/installing/index.html"/>
<search:hit rank="4" score="0.55319154" 
uri="http://localhost:8080/cocoon/documents/developing/extending.html"/>
<search:hit rank="5" score="0.30174083" 
uri="http://localhost:8080/cocoon/documents/faq.html"/>
<search:hit rank="6" score="0.30174083" 
uri="http://localhost:8080/cocoon/documents/faq.html"/>
<search:hit rank="7" score="0.30174083" 
uri="http://localhost:8080/cocoon/documents/faq.html"/>
</search:hits>
</search:results>

Search DTD:
<!ELEMENT results (hits?)>
<!ATTLIST results
  date CDATA #IMPLIED
  query-string CDATA #IMPLIED
 >
<!ELEMENT hits (hit)*>
<!ATTLIST hits
  start-index CDATA #IMPLIED
  page-length CDATA #IMPLIED
  total-count CDATA #IMPLIED>
<!ELEMENT hit EMPTY>
<!ATTLIST hit
  uri CDATA #IMPLIED
  score CDATA #IMPLIED
  rank CDATA #IMPLIED>

I have choose not to put the score as simple float as it comes from lucene.
Is there any use for xlink?
I added the query-string which was used, and the range of results should 
get displayed.
Moreover the date of the search long, for knowing when the search was done.

Is there any us of the search-xml, but only transforming it to html?
Makes it sense to cache it, save it, or index it, too?
Any ideas?

bye bernhard







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

Reply via email to