You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Karthik Manimaran <mk...@gmail.com> on 2005/11/13 10:01:19 UTC

search.xmap query

Hi,
 Deleting search.xmap in build directory seems to have no effect on Lucene
search (it still works fine) and so does modifying/adding new pipeline in
search.xmap. Any reasons?
 Thanks and regards,
Karthik.

Re: search.xmap query

Posted by Brian M Dube <br...@gmail.com>.
On 11/13/05, Karthik Manimaran <mk...@gmail.com> wrote:
> It was a weird behaviour of my system. The problem stands resolved. I find
> search.xmap in webapp directory. However the object of me touching
> search.xmap is still unresolved. I'm trying to make Lucene search and index
> the raw HTML files (all raw html files and folders are placed in a folder
> globaljavadocs under content). What could be wrong with the following code?
>
>       <!-- Creates a lucene:document from a Forrest document body -->
>       <map:match pattern="**body-*.lucene">
>
>         <map:select type="exists">
>
>           <map:when test="{project:content.globaljavadocs}{1}{2}.ehtml">
>             <map:generate type="html"
> src="{project:content.globaljavadocs}{1}{2}.ehtml" />
>             <map:transform
> src="{forrest:stylesheets}/html2htmlbody.xsl" />
>           </map:when>
>
>           <map:when test="{project:content.xdocs}{1}{2}.ehtml">
>             <map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
>              <map:transform
> src="{forrest:stylesheets}/html2htmlbody.xsl" />
>           </map:when>
>           <map:when test="cocoon://{1}{2}.xml">
>             <map:generate src="cocoon://{1}{2}.xml"/>
>           </map:when>
>         </map:select>
>         <map:transform
> src="{forrest:stylesheets}/search/document2lucene.xsl">
>           <map:parameter name="document-url" value="{1}{2}.xml"/>
>         </map:transform>
>         <map:serialize type="xml"/>
>       </map:match>
>
>       <!-- Creates a lucene:document from a Forrest document (same as
>       above, as search-relevant information is only contained in the
>       body) -->
>       <map:match pattern="*.lucene">
>         <map:generate src="cocoon:/body-{0}"/>
>         <map:serialize type="xml"/>
>       </map:match>
>
>       <map:match pattern="**/*.lucene">
>         <map:generate src="cocoon:/{1}/body-{2}.lucene"/>
>         <map:serialize type="xml"/>
>       </map:match>

You have "cocoon:/" in two places here. Should these be "cocoon://"?

>
>
> Thanks and regards,
> Karthik.
>
>
> On 11/13/05, Ross Gardler <rg...@apache.org> wrote:
> > Karthik Manimaran wrote:
> >
> > > Deleting search.xmap in build directory seems to have no effect on
> > > Lucene search (it still works fine) and so does modifying/adding new
> > > pipeline in search.xmap. Any reasons?
> >
> >
> > What build directory are you finding search.xmap? The core XMaps are
> > used in-place and should not be in any build directory.
> >
> > Ross
> >
>
>

Re: search.xmap query

Posted by Karthik Manimaran <mk...@gmail.com>.
I do not have link from xml documents/forrest menus/tabs. The files are all
html files (javadoc files basically) that are present within
src\documentation\content\globaljavadocs and rendered as raw html files. The
behaviour mentioned in the previous mail doesnt change even if I use .html
instead of .ehtml
 I was able to make forrest render these static html files by adding the
following lines to src\documentation\sitemap.xmap:
 <map:match pattern="**.html">
<map:select type="exists">
<map:when test="{project:content}{0}">
<map:read src="{project:content}/{0}" mime-type="text/html"/>
<map:generate type="html" src="{project:content}/{0}" />
<map:serialize type="html"/>
</map:when>
</map:select>
</map:match>
 No I am unable to make Lucene index and search these raw html files by
making changes to search.xmap.


 On 11/13/05, David Crossley <cr...@apache.org> wrote:
>
> Karthik Manimaran wrote:
> > It was a weird behaviour of my system. The problem stands resolved. I
> find
> > search.xmap in webapp directory. However the object of me touching
> > search.xmap is still unresolved. I'm trying to make Lucene search and
> index
> > the raw HTML files (all raw html files and folders are placed in a
> folder
> > globaljavadocs under content). What could be wrong with the following
> code?
> > <!-- Creates a lucene:document from a Forrest document body -->
> > <map:match pattern="**body-*.lucene">
> >
> > <map:select type="exists">
> >
> > <map:when test="{project:content.globaljavadocs}{1}{2}.ehtml">
> > <map:generate type="html" src="{project:content.globaljavadocs
> }{1}{2}.ehtml"
> > />
> > <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
> > </map:when>
> >
> > <map:when test="{project:content.xdocs}{1}{2}.ehtml">
> > <map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
> > <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
> > </map:when>
> ...
>
> Perhaps you missed my previous email on this topic.
> Why are you using the .ehtml filename extension.
> What filename extension do your globaljavadocs/* have?
>
> Also you mean
> {project:content}/globaljavadocs/...
>
> Also do you have a link from your xml source documents
> (or forrest menus or tabs) that Lucene will crawl,
> linking over to these javadocs.
>
> -David
>

Re: search.xmap query

Posted by David Crossley <cr...@apache.org>.
Karthik Manimaran wrote:
> It was a weird behaviour of my system. The problem stands resolved. I find
> search.xmap in webapp directory. However the object of me touching
> search.xmap is still unresolved. I'm trying to make Lucene search and index
> the raw HTML files (all raw html files and folders are placed in a folder
> globaljavadocs under content). What could be wrong with the following code?
>   <!-- Creates a lucene:document from a Forrest document body -->
> <map:match pattern="**body-*.lucene">
> 
> <map:select type="exists">
> 
> <map:when test="{project:content.globaljavadocs}{1}{2}.ehtml">
> <map:generate type="html" src="{project:content.globaljavadocs}{1}{2}.ehtml"
> />
> <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
> </map:when>
> 
> <map:when test="{project:content.xdocs}{1}{2}.ehtml">
> <map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
> <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
> </map:when>
...

Perhaps you missed my previous email on this topic.
Why are you using the .ehtml filename extension.
What filename extension do your globaljavadocs/* have?

Also you mean
{project:content}/globaljavadocs/...

Also do you have a link from your xml source documents
(or forrest menus or tabs) that Lucene will crawl,
linking over to these javadocs.

-David

Re: search.xmap query

Posted by Karthik Manimaran <mk...@gmail.com>.
It was a weird behaviour of my system. The problem stands resolved. I find
search.xmap in webapp directory. However the object of me touching
search.xmap is still unresolved. I'm trying to make Lucene search and index
the raw HTML files (all raw html files and folders are placed in a folder
globaljavadocs under content). What could be wrong with the following code?
  <!-- Creates a lucene:document from a Forrest document body -->
<map:match pattern="**body-*.lucene">

<map:select type="exists">

<map:when test="{project:content.globaljavadocs}{1}{2}.ehtml">
<map:generate type="html" src="{project:content.globaljavadocs}{1}{2}.ehtml"
/>
<map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
</map:when>

<map:when test="{project:content.xdocs}{1}{2}.ehtml">
<map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
<map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
</map:when>
<map:when test="cocoon://{1}{2}.xml">
<map:generate src="cocoon://{1}{2}.xml"/>
</map:when>
</map:select>
<map:transform src="{forrest:stylesheets}/search/document2lucene.xsl">
<map:parameter name="document-url" value="{1}{2}.xml"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>

<!-- Creates a lucene:document from a Forrest document (same as
above, as search-relevant information is only contained in the
body) -->
<map:match pattern="*.lucene">
<map:generate src="cocoon:/body-{0}"/>
<map:serialize type="xml"/>
</map:match>

<map:match pattern="**/*.lucene">
<map:generate src="cocoon:/{1}/body-{2}.lucene"/>
<map:serialize type="xml"/>
</map:match>

Thanks and regards,
Karthik.
 On 11/13/05, Ross Gardler <rg...@apache.org> wrote:
>
> Karthik Manimaran wrote:
>
> > Deleting search.xmap in build directory seems to have no effect on
> > Lucene search (it still works fine) and so does modifying/adding new
> > pipeline in search.xmap. Any reasons?
>
>
> What build directory are you finding search.xmap? The core XMaps are
> used in-place and should not be in any build directory.
>
> Ross
>

Re: search.xmap query

Posted by Ross Gardler <rg...@apache.org>.
Karthik Manimaran wrote:

> Deleting search.xmap in build directory seems to have no effect on 
> Lucene search (it still works fine) and so does modifying/adding new 
> pipeline in search.xmap. Any reasons?


What build directory are you finding search.xmap? The core XMaps are 
used in-place and should not be in any build directory.

Ross