svn commit: r640894 - in /lenya/trunk/src/modules/xhtml: sitemap.xmap xslt/xhtml2index.xsl

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Tue Mar 25 09:50:08 2008
New Revision: 640894

URL: http://svn.apache.org/viewvc?rev=640894&view=rev
Log:
Move meta data indexing from xhtml module to lucene module.

Modified:
    lenya/trunk/src/modules/xhtml/sitemap.xmap
    lenya/trunk/src/modules/xhtml/xslt/xhtml2index.xsl

Modified: lenya/trunk/src/modules/xhtml/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/sitemap.xmap?rev=640894&r1=640893&r2=640894&view=diff
==============================================================================
--- lenya/trunk/src/modules/xhtml/sitemap.xmap (original)
+++ lenya/trunk/src/modules/xhtml/sitemap.xmap Tue Mar 25 09:50:08 2008
@@ -41,15 +41,10 @@
       
       <!-- {pub-id}/{area}/{uuid}/{language} -->
       <map:match pattern="lucene-index/*/*/*/*">
-        <map:aggregate element="cmsbody">
-          <map:part src="lenya-document:{3},pub={1},area={2},lang={4}"/>
-          <map:part src="cocoon://modules/metadata/{1}/{2}/{3}/{4}"/>
-        </map:aggregate>
-  
+        <map:generate src="lenya-document:{3},pub={1},area={2},lang={4}"/>
         <map:transform src="fallback://lenya/modules/xhtml/xslt/xhtml2index.xsl">
           <map:parameter name="url" value="{request:requestURI}"/>
         </map:transform>
-        
         <map:serialize type="xml"/>
       </map:match>
     </map:pipeline>

Modified: lenya/trunk/src/modules/xhtml/xslt/xhtml2index.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/xslt/xhtml2index.xsl?rev=640894&r1=640893&r2=640894&view=diff
==============================================================================
--- lenya/trunk/src/modules/xhtml/xslt/xhtml2index.xsl (original)
+++ lenya/trunk/src/modules/xhtml/xslt/xhtml2index.xsl Tue Mar 25 09:50:08 2008
@@ -9,38 +9,22 @@
 
 <xsl:param name="uri"/>
 
-<xsl:variable name="boost" select="number(/descendant-or-self::dc:rights)"/>  
-
 <xsl:template match="/">
   <!-- attributes of the index and document element will be added by the lucene module -->
   <lucene:index>
     <lucene:document>
-      <lucene:field name="url" boost="{$boost}"><xsl:value-of select="$uri"/></lucene:field>
+      <lucene:field name="url" boost="0"><xsl:value-of select="$uri"/></lucene:field>
       <xsl:apply-templates/>
     </lucene:document>
   </lucene:index>  
 </xsl:template>
 
-<xsl:template match="dc:rights" priority="1"/>
-
 <xsl:template match="xhtml:body" priority="1">
-  <lucene:field name="body" boost="{$boost}">
+  <lucene:field name="body" boost="1">
     <xsl:for-each select=".//text()">
       <xsl:value-of select="concat(normalize-space(.),' ')"/>
     </xsl:for-each>
   </lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:title" priority="1">
-  <lucene:field name="title" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:description" priority="1">
-  <lucene:field name="description" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:subject" priority="1">
-  <lucene:field name="subject" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
 </xsl:template>
 
 <xsl:template match="@*|node()" priority="-1">
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.