Author: dlestrat Date: Sat Dec 3 14:35:02 2005 New Revision: 352037 URL: http://svn.apache.org/viewcvs?rev=352037&view=rev Log: Search component documentation.
http://issues.apache.org/jira/browse/JS2-414 Added: portals/jetspeed-2/trunk/components/search/xdocs/images/portlet-search.gif (with props) portals/jetspeed-2/trunk/components/search/xdocs/images/searchengine-c.gif (with props) portals/jetspeed-2/trunk/components/search/xdocs/images/searchhandlers-c.gif (with props) portals/jetspeed-2/trunk/components/search/xdocs/index.xml portals/jetspeed-2/trunk/components/search/xdocs/using-search.xml Modified: portals/jetspeed-2/trunk/components/search/xdocs/navigation.xml portals/jetspeed-2/trunk/xdocs/guides/guide-components.xml portals/jetspeed-2/trunk/xdocs/navigation.xml Added: portals/jetspeed-2/trunk/components/search/xdocs/images/portlet-search.gif URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/images/portlet-search.gif?rev=352037&view=auto ============================================================================== Binary file - no diff available. Propchange: portals/jetspeed-2/trunk/components/search/xdocs/images/portlet-search.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: portals/jetspeed-2/trunk/components/search/xdocs/images/searchengine-c.gif URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/images/searchengine-c.gif?rev=352037&view=auto ============================================================================== Binary file - no diff available. Propchange: portals/jetspeed-2/trunk/components/search/xdocs/images/searchengine-c.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: portals/jetspeed-2/trunk/components/search/xdocs/images/searchhandlers-c.gif URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/images/searchhandlers-c.gif?rev=352037&view=auto ============================================================================== Binary file - no diff available. Propchange: portals/jetspeed-2/trunk/components/search/xdocs/images/searchhandlers-c.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: portals/jetspeed-2/trunk/components/search/xdocs/index.xml URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/index.xml?rev=352037&view=auto ============================================================================== --- portals/jetspeed-2/trunk/components/search/xdocs/index.xml (added) +++ portals/jetspeed-2/trunk/components/search/xdocs/index.xml Sat Dec 3 14:35:02 2005 @@ -0,0 +1,83 @@ +<?xml version="1.0" ?> +<!-- + Copyright 2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed-2 Search</title> + <authors> + <person name="David Le Strat" email="[EMAIL PROTECTED]" /> + </authors> + </properties> + <body> + <section name="Search Overview"> + <p> + Jetspeed-2 provides an integration with the popular <a href="http://lucene.apache.org/">Apache Lucene</a>, + a high-performance, full-featured text search engine library written entirely in Java; a technology suitable + for nearly any application that requires full-text search, especially cross-platform.. + </p> + <subsection name="SearchEngine Overview"> + <p> + Jetspeed-2 provides a <code>SearchEngine</code> component configured as a spring component. The <code>SearchEngine</code> + component is configured in <code>WEB-INF/assembly/search.xml</code>. The default implementation based on the embedded Lucene + search engine must specify the location of the search index file, the name of the analyzer class (if null the default analyzer + <code>StandardAnalyzer</code> is used), whether to optimize after update and the <code>HandlerFactory</code>: + <pre> + <bean id="org.apache.jetspeed.search.SearchEngine" + class="org.apache.jetspeed.search.lucene.SearchEngineImpl"> + <constructor-arg index="0"><value>${applicationRoot}/WEB-INF/search_index</value></constructor-arg> + <constructor-arg index="1"><null /></constructor-arg> + <constructor-arg type="boolean"><valu>true</value></constructor-arg> + <constructor-arg><ref bean="org.apache.jetspeed.search.HandlerFactory"/></constructor-arg> + </bean></pre> + </p> + <p> + The <code>HandlerFactory</code> provides the <code>SearchEngine</code> with a list of <code>ObjectHandler</code> + that will handle the various document types supported by Jetspeed-2 for search. By default, Jetspeed-2 supports + portlet instances and portlet definitions as searchable entities. When portlets are registered to the portal, + <code>searchEngine.add(pa)</code> and <code>searchEngine.add(pa.getPortletDefinitions())</code> are invoked. This + action updates the Jetspeed-2 search index. For more information on how portlets are registered to the search engine, + see <code>org.apache.jetspeed.tools.pamanager.PortletApplicationManager</code>. + <br/> + <img src="images/searchengine-c.gif" border="0"/> + </p> + </subsection> + <subsection name="Document Handlers Overview"> + <p> + Document Handlers are responsible for the parsing of a specific document type in order to index the relevant document fields. + </p> + <p> + Jetspeed-2 provides 2 document handlers implementations responsible for parsing parsing the documents supported by Jetspeed-2 + as <code>org.apache.jetspeed.search.ParsedObject</code>. The <code>ParsedObject</code> specify the list of fields + and documents supported by Jetspeed-2 that can then be added to <code>org.apache.lucene.document.Document</code> and + written to the index through <code>indexWriter.addDocument(doc)</code> operation of the + <a href="http://lucene.apache.org/java/docs/api/index.html"><code>IndexWriter</code></a>. + </p> + <p> + By default, Jetspeed-2 can index portlet applications and portlet definitions respectively through the + <code>PortletApplicationHandler</code> and <code>PortletDefinitionHandler</code>. + <br/> + <img src="images/searchhandlers-c.gif" border="0"/> + </p> + </subsection> + <subsection name="An Extensible Framework"> + <p> + As most components in Jetspeed-2, the search engine can easily be extended to support addional document types. + </p> + </subsection> + </section> + </body> +</document> + Modified: portals/jetspeed-2/trunk/components/search/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/navigation.xml?rev=352037&r1=352036&r2=352037&view=diff ============================================================================== --- portals/jetspeed-2/trunk/components/search/xdocs/navigation.xml (original) +++ portals/jetspeed-2/trunk/components/search/xdocs/navigation.xml Sat Dec 3 14:35:02 2005 @@ -17,9 +17,14 @@ <project> <body> <links> - <item name="Jetspeed 2" href="../../index.html" /> + <item name="Components Guide" href="../../guides/guide-components.html" /> + <item name="Jetspeed 2" href="../../index.html" /> <!-- Cannot access ${pom.id}... Hard coding pdf name. --> <item name="PDF Documentation" href="/jetspeed-search.pdf" img="../../images/pdf.gif" /> </links> + <menu name="Jetspeed-2 Search Documentation"> + <item name="Search Overview" href="index.html" /> + <item name="Using the Search Engine" href="using-search.html" /> + </menu> </body> </project> Added: portals/jetspeed-2/trunk/components/search/xdocs/using-search.xml URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/search/xdocs/using-search.xml?rev=352037&view=auto ============================================================================== --- portals/jetspeed-2/trunk/components/search/xdocs/using-search.xml (added) +++ portals/jetspeed-2/trunk/components/search/xdocs/using-search.xml Sat Dec 3 14:35:02 2005 @@ -0,0 +1,44 @@ +<?xml version="1.0" ?> +<!-- + Copyright 2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed-2 Search</title> + <authors> + <person name="David Le Strat" email="[EMAIL PROTECTED]" /> + </authors> + </properties> + <body> + <section name="Using Jetspeed Search Engine"> + <p> + Jetspeed-2 <code>SearchEngine</code> exposes a <code>search</code> operation returning <code>SearchResults</code>. + The <code>SearchResult</code> can be iterated through to display the result of the search. + </p> + <subsection name="Portlet Search"> + <p> + Jetspeed-2 <code>SearchEngine</code> is used by the <code>PortletApplicationBrowser</code> portlet to search + and retrieve portlet according to a given criteria. + <br/> + <img src="images/portlet-search.gif" border="0" /> + </p> + <p> + Performing a search for "security" returns all the matching portlets and portlet definitions. + </p> + </subsection> + </section> + </body> +</document> + Modified: portals/jetspeed-2/trunk/xdocs/guides/guide-components.xml URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/xdocs/guides/guide-components.xml?rev=352037&r1=352036&r2=352037&view=diff ============================================================================== --- portals/jetspeed-2/trunk/xdocs/guides/guide-components.xml (original) +++ portals/jetspeed-2/trunk/xdocs/guides/guide-components.xml Sat Dec 3 14:35:02 2005 @@ -167,7 +167,7 @@ without having to impact the higher level security services.</td> </tr> </table><br/> - <!-- table> + <table> <tr> <th colspan="2">Jetspeed-2 Search - Artifact Id: jetspeed-search</th> </tr> @@ -176,10 +176,15 @@ <th>Description</th> </tr> <tr> - <td><a href="../multiproject/jetspeed-prefs/index.html"><code>PreferencesProvider</code></a></td> - <td>The <code>PreferencesProvider</code> exposes Jetspeed-2 implementation of the <code>java.util.Preferences</code> API.</td> + <td><a href="../multiproject/jetspeed-search/index.html"><code>SearchEngine</code></a></td> + <td>The <code>SearchEngine</code> provide the integration with the <a href="http://lucene.apache.org/">Apache Lucene</a> search + engine.</td> </tr> - </table><br/--> + <tr> + <td><a href="../multiproject/jetspeed-search/index.html"><code>HandlerFactory</code></a></td> + <td>The <code>HandlerFactory</code> exposes the documents handlers to the <code>SearchEngine</code>.</td> + </tr> + </table><br/> <!-- table> <tr> <th colspan="2">Jetspeed-2 Statistics - Artifact Id: jetspeed-statistics</th> Modified: portals/jetspeed-2/trunk/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/xdocs/navigation.xml?rev=352037&r1=352036&r2=352037&view=diff ============================================================================== --- portals/jetspeed-2/trunk/xdocs/navigation.xml (original) +++ portals/jetspeed-2/trunk/xdocs/navigation.xml Sat Dec 3 14:35:02 2005 @@ -32,8 +32,8 @@ </menu> <menu name="Documentation"> <item name="Documentation Guides" href="guides/index.html" /> - <item name="Jetspeed API" href="http://portals.apache.org/jetspeed-2/multiproject/jetspeed-api/apidocs/index.html" /> - <item name="Jetspeed Plugin" href="j2-maven-plugin.html" /> + <item name="Jetspeed-2 API" href="http://portals.apache.org/jetspeed-2/multiproject/jetspeed-api/apidocs/index.html" /> + <item name="Jetspeed-2 Plugin" href="j2-maven-plugin.html" /> </menu> <menu name="About Jetspeed-2"> <item name="FAQs" href="faq.html" /> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
