You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by je...@apache.org on 2002/11/23 18:11:17 UTC

cvs commit: xml-cocoon2/src/documentation/xdocs/userdocs/concepts xmlsearching.xml

jeremy      2002/11/23 09:11:17

  Modified:    src/documentation/xdocs/userdocs/concepts xmlsearching.xml
  Log:
  updated documentation of the various new options when indexing and searching
  
  Revision  Changes    Path
  1.3       +43 -5     xml-cocoon2/src/documentation/xdocs/userdocs/concepts/xmlsearching.xml
  
  Index: xmlsearching.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/concepts/xmlsearching.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xmlsearching.xml	18 Feb 2002 09:25:27 -0000	1.2
  +++ xmlsearching.xml	23 Nov 2002 17:11:17 -0000	1.3
  @@ -9,6 +9,7 @@
       <type>Technical document</type> 
       <authors>
         <person name="Bernhard Huber" email="berni_huber@a1.net"/>
  +      <person name="Jeremy Quinn" email="jeremy@apache.org"/>
       </authors>
     </header>
   
  @@ -19,9 +20,9 @@
           in Apache Cocoon.
         </p>
         <p>
  -        Indexing describes the process of fetching XML documents from an Apache Cocoon
  +        Indexing is the process of fetching XML documents from an Apache Cocoon
           instance, and building an index file.
  -        Searching describes the process of querying the once built index.
  +        Searching is the process of querying the once built index.
         </p>
       </s1>
    
  @@ -55,14 +56,14 @@
         </s2>
         <s2 title="Fetching URL resource">
           <p>
  -          This processing step fetches an URL resource from Apache Cocoon.
  +          This processing step fetches the URL resource from Apache Cocoon.
           </p>
           <p>
             Apache Cocoon offers the feature of views.
             This feature is used to fetch the 'bare' content of an URL.
           </p>
           <p>
  -          The above described crawling component is used by the this processing step
  +          The crawling component described above is used by the this processing step
             to retrieve a link of an XML document. 
             The link name is augmented by a cocoon view name for fetching the XML resource.
           </p>
  @@ -70,12 +71,16 @@
             The Avalon component <code>CocoonCrawler</code> defines the interface
             of a crawler.
           </p>
  +        <p>
  +          The Avalon component <code>SimpleCocoonCrawlerImpl</code> is the implementation. 
  +          It can be configured to use a specific view, or default to the 'content' view.
  +        </p>
         </s2>
         <s2 title="Generating index">
           <p>
             A xml resource is fed into a indexing engine.
             Generating an index specifies which elements of an XML resources
  -          should get indexed, how the elements are stored in the indexed.
  +          should get indexed, how the elements are stored in the index.
             Moreover the physical file location of the index is specified by
             this processing step.
           </p>
  @@ -89,6 +94,7 @@
               as field name. An attribute has following field name 
               <code>{element-name}@{attribute-name}</code>.
             </li>
  +          <li>XML elements that match the names you configured in cocoon.xconf are added as stored fields.</li>
           </ul>
           <p>
             The Avalon component <code>LuceneCocoonIndexer</code> defines the interface
  @@ -163,6 +169,10 @@
             the index. This field is used for checking if the XML resource is newer than
             the information stored in the Lucene index.
           </li>
  +        <li>
  +          Further Stored fields can be added, depending on your configuration. 
  +          Stored fields are returned in the hits found by the engine.
  +        </li>
         </ul>
       </s1>
         
  @@ -171,10 +181,38 @@
           Configuring the indexing, and searching Avalon components is specified
           in the <code>cocoon.xconf</code> file.
         </p>
  +      <s2 title="example">
  +				<p>This would set up the crawler to crawl all of your site, except pages in the 'search' section, also we are telling the crawler to use a non-standard cocoon-view for getting the links in documents, called 'my-search-links'. </p>
  +<source><![CDATA[
  +<cocoon-crawler logger="core.search.crawler">
  +	<exclude>.*/search/.*</exclude>
  +	<link-view-query>cocoon-view=my-search-links</link-view-query>
  +</cocoon-crawler>
  +]]></source>
  +      	<p>This tells the indexer to use the non-standard 'my-search-content' view to retrieve the content for indexing. Also it tells the indexer that we would like to have any 'title' or 'subtitle' XML elements in the documant added to the index as stored fields, so they can be retrieved and displayed to the user with any hits they get.</p>
  +<source><![CDATA[
  +<lucene-xml-indexer logger="core.search.lucene">
  +	<store-fields>title, subtitle</store-fields>
  +	<content-view-query>cocoon-view=my-search-content</content-view-query>
  +</lucene-xml-indexer>
  +]]></source>
  +      </s2>
         <p>
           Setting up the sitemap component SearchGenerator takes place in the
           <code>sitemap.xmap</code> file.
         </p>
  +      <s2 title="example">
  +				<p>This would generate a document from a search, getting the query and other information from request parameters.</p>
  +<source><![CDATA[
  +<map:generate type="search"/>
  +]]></source>
  +      	<p>This would generate a document from a search, getting the query from the sitemap parameter '1' and other information from request parameters.</p>
  +<source><![CDATA[
  +<map:generate type="search">
  +	<map:parameter name="query" value="{1}"/>
  +</map:generate>	
  +]]></source>
  +      </s2>
       </s1>
       
       <s1 title="Implementation notes">
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org