View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-ecm/trunk/src/site/xdoc/use-hippo-ecm/hippo-ecm-concepts/searching.xml
(Generate patch)

Comparing hippo-ecm/trunk/src/site/xdoc/use-hippo-ecm/hippo-ecm-concepts/searching.xml (file contents):
Revision 11982 by aschrijvers, Wed Jun 11 11:34:05 2008 UTC vs.
Revision 11983 by aschrijvers, Wed Jun 11 12:10:52 2008 UTC

35 Programmatically you can search by writing for example an XPATH expression, and 35 Programmatically you can search by writing for example an XPATH expression, and
36 let the QueryManager execute this query. For example how to find all documents 36 let the QueryManager execute this query. For example how to find all documents
37 about 'Java Content Repository'. 37 about 'Java Content Repository'.
38 </p> 38 </p>
39 <source> 39 <source>
40 String xpath = "//*[jcr:contains(.,'Java Content Repository')]"; 40String xpath = "//*[jcr:contains(.,'Java Content Repository')]";
41 QueryManager qmgr = session.getWorkspace().getQueryManager(); 41QueryManager qmgr = session.getWorkspace().getQueryManager();
42 Query query = qmgr.createQuery(xpath, Query.XPATH); 42Query query = qmgr.createQuery(xpath, Query.XPATH);
43 QueryResult res = query.execute(); 43QueryResult res = query.execute();
44 </source> 44 </source>
45 <p> 45 <p>
46 <b>We don't want to know this actually, do we?</b> If you want to know more about 46 <b>We don't want to know this actually, do we?</b> If you want to know more about
47 this, see <a target="_new" href="http://jcp.org/aboutJava/communityprocess/final/jsr170/index.html">jsr-170</a> 47 this, see <a target="_new" href="http://jcp.org/aboutJava/communityprocess/final/jsr170/index.html">jsr-170</a>
48 </p> 48 </p>
49 </subsection> 49 </subsection>
50 <subsection name="Hippo CMS makes it easier for you"> 50 <subsection name="Hippo CMS makes it easier for you">
51 51 <p>
52 A default template plugin in Hippo CMS is the hippo query template plugin. This plugin
53 enables you to store a search in the repository. You can for example store a query in your
54 document that says: 'do here a query/search that show the last 3 news items'.
55 Currently, the plugin lets you type an Xpath or SQL statement and gives you feedback wether
56 the statement is valid. Obviously, and this is in the <a href="../roadmap.html">roadmap</a>, we will
57 provide a GUI to enable you creating searches without having to know the Xpath syntax.
58 </p>
52 </subsection> 59 </subsection>
60 <subsection name="How to use a stored search/query">
61 <p>
62 A frontend can execute a query node to get the actual search result. The
63 <a href="/website-development/index.html">Hippo Site Toolkit</a> automatically
64 detects a search node, executes the search and let you navigate through the result set.
65 </p>
66 </subsection>
67 <subsection name="Parameterized searches">
68 <p>
69 As explained you can store a search in Hippo Repository. But, obviously, perhaps you
70 want to reuse the same search but only tune a parameter, like the number of results you want.
71 Therefor, we support parameterized queries. This means that at some place in the query, a '$' can
72 be placed, which is substituted by a value during execution. See <a href="/website-development/index.html">Hippo Site Toolkit</a>
73 on how you can use this.
74 </p>
75 </subsection>
53 </section> 76 </section>
54 </body> 77 </body>
55 </document> 78 </document>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines