PageRenderTime 50ms CodeModel.GetById 34ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/modules/mod_search/mod_search.html

https://code.google.com/p/zotonic/
HTML | 95 lines | 80 code | 15 blank | 0 comment | 0 complexity | 49c14e41e12e7d72900a93a3135f5995 MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2<html>
 3<head>
 4<title>Module mod_search</title>
 5<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
 6</head>
 7<body bgcolor="white">
 8<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
 9<hr>
10
11<h1>Module mod_search</h1>
12<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Defines PostgreSQL queries for basic content searches in Zotonic.
13<p>Copyright Š 2009 Marc Worrell
14  Date: 2009-06-09</p>
15
16<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
17<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
18
19<h2><a name="description">Description</a></h2>Defines PostgreSQL queries for basic content searches in Zotonic.
20  This module needs to be split in specific PostgreSQL queries and standard SQL queries when you want to
21  support other databases (like MySQL).
22<h2><a name="index">Function Index</a></h2>
23<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td>Convert process state when code is changed.</td></tr>
24<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td>Trap unknown calls.</td></tr>
25<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td>Casts for updates to resources.</td></tr>
26<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td>Handling all non call/cast messages.</td></tr>
27<tr><td valign="top"><a href="#init-1">init/1</a></td><td>Initiates the server.</td></tr>
28<tr><td valign="top"><a href="#observe_module_activate-2">observe_module_activate/2</a></td><td></td></tr>
29<tr><td valign="top"><a href="#observe_search_query-2">observe_search_query/2</a></td><td></td></tr>
30<tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td>Starts the server.</td></tr>
31<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td>This function is called by a gen_server when it is about to
32  terminate.</td></tr>
33<tr><td valign="top"><a href="#to_tsquery-2">to_tsquery/2</a></td><td>Expand a search string like "hello wor" to a posgres search query.</td></tr>
34</table>
35
36<h2><a name="functions">Function Details</a></h2>
37
38<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
39<div class="spec">
40<p><tt>code_change(OldVsn, State, Extra) -&gt; {ok, NewState}</tt></p>
41</div><p>Convert process state when code is changed</p>
42
43<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
44<div class="spec">
45<p><tt>handle_call(Message::Request, From, State) -&gt; {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}</tt></p>
46</div><p>Trap unknown calls</p>
47
48<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
49<div class="spec">
50<p><tt>handle_cast(Message::Msg, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
51</div><p>Casts for updates to resources</p>
52
53<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
54<div class="spec">
55<p><tt>handle_info(Info, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
56</div><p>Handling all non call/cast messages</p>
57
58<h3 class="function"><a name="init-1">init/1</a></h3>
59<div class="spec">
60<p><tt>init(Args) -&gt; {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}</tt></p>
61</div><p>Initiates the server.</p>
62
63<h3 class="function"><a name="observe_module_activate-2">observe_module_activate/2</a></h3>
64<div class="spec">
65<p><tt>observe_module_activate(X1, Context) -&gt; any()</tt></p>
66</div>
67
68<h3 class="function"><a name="observe_search_query-2">observe_search_query/2</a></h3>
69<div class="spec">
70<p><tt>observe_search_query(X1, Context) -&gt; any()</tt></p>
71</div>
72
73<h3 class="function"><a name="start_link-1">start_link/1</a></h3>
74<div class="spec">
75<p><tt>start_link(Args) -&gt; {ok, Pid} | ignore | {error, Error}</tt></p>
76</div><p>Starts the server</p>
77
78<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
79<div class="spec">
80<p><tt>terminate(Reason, State) -&gt; <a href="#type-void">void()</a></tt></p>
81</div><p>This function is called by a gen_server when it is about to
82  terminate. It should be the opposite of Module:init/1 and do any necessary
83  cleaning up. When it returns, the gen_server terminates with Reason.
84  The return value is ignored.</p>
85
86<h3 class="function"><a name="to_tsquery-2">to_tsquery/2</a></h3>
87<div class="spec">
88<p><tt>to_tsquery(Text, Context) -&gt; any()</tt></p>
89</div><p>Expand a search string like "hello wor" to a posgres search query.</p>
90<hr>
91
92<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
93<p><i>Generated by EDoc, Aug 12 2011, 19:36:12.</i></p>
94</body>
95</html>