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
Revision: 11983
Committed: Wed Jun 11 12:10:52 2008 UTC (11 years, 11 months ago) by aschrijvers
Content type: text/plain
File size: 4294 byte(s)
Log Message:
HREPTWO-670 about searching

File Contents

# Content
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE document PUBLIC
3 "-//Apache Software Foundation//DTD XDOC 1.0//EN"
4 "http://maven.apache.org/dtd/xdoc_1_0.dtd">
5 <!--
6 Copyright 2007 Hippo
7
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS"
16 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 -->
20 <document>
21 <properties>
22 <title>Searching</title>
23 </properties>
24 <body>
25 <section name="Searching">
26 <p>
27 Jackrabbit has the jsr-170 XPATH subset and SQL subset imlementation out-of-the-box
28 (plus some extra XPATH features). Hippo Repository adds facet search, and its own stored
29 parameterized searches (see below). Also Hippo Repository accounts for authorization
30 directly in the search (beside the normal access control) making the search really efficient,
31 even for users who have read access for only few documents.
32 </p>
33 <subsection name="How to search in Hippo Repository">
34 <p>
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
37 about 'Java Content Repository'.
38 </p>
39 <source>
40 String xpath = "//*[jcr:contains(.,'Java Content Repository')]";
41 QueryManager qmgr = session.getWorkspace().getQueryManager();
42 Query query = qmgr.createQuery(xpath, Query.XPATH);
43 QueryResult res = query.execute();
44 </source>
45 <p>
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>
48 </p>
49 </subsection>
50 <subsection name="Hippo CMS makes it easier for you">
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>
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>
76 </section>
77 </body>
78 </document>

Properties

Name Value
svn:eol-style native
svn:keywords Id
svn:mime-type text/plain