acts_as_searchable 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,248 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: EstraierPure::NodeResult</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">EstraierPure::NodeResult</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/vendor/estraierpure_rb.html">
59
+ lib/vendor/estraierpure.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Abstraction of result set from node.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000001">doc_num</a>&nbsp;&nbsp;
96
+ <a href="#M000002">get_doc</a>&nbsp;&nbsp;
97
+ <a href="#M000003">hint</a>&nbsp;&nbsp;
98
+ <a href="#M000004">new</a>&nbsp;&nbsp;
99
+ </div>
100
+ </div>
101
+
102
+ </div>
103
+
104
+
105
+ <!-- if includes -->
106
+
107
+ <div id="section">
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+ <div id="methods">
118
+ <h3 class="section-bar">Public Class methods</h3>
119
+
120
+ <div id="method-M000004" class="method-detail">
121
+ <a name="M000004"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="#M000004" class="method-signature">
125
+ <span class="method-name">new</span><span class="method-args">(docs, hints)</span>
126
+ </a>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+ <p>
131
+ Create a node result object.
132
+ </p>
133
+ <p><a class="source-toggle" href="#"
134
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
135
+ <div class="method-source-code" id="M000004-source">
136
+ <pre>
137
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 420</span>
138
+ 420: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">docs</span>, <span class="ruby-identifier">hints</span>)
139
+ 421: <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">docs</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">Array</span>, <span class="ruby-identifier">hints</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">Hash</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
140
+ 422: <span class="ruby-ivar">@docs</span> = <span class="ruby-identifier">docs</span>
141
+ 423: <span class="ruby-ivar">@hints</span> = <span class="ruby-identifier">hints</span>
142
+ 424: <span class="ruby-keyword kw">end</span>
143
+ </pre>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ <h3 class="section-bar">Public Instance methods</h3>
149
+
150
+ <div id="method-M000001" class="method-detail">
151
+ <a name="M000001"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000001" class="method-signature">
155
+ <span class="method-name">doc_num</span><span class="method-args">()</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p>
161
+ Get the number of documents. The return value is the number of documents.
162
+ </p>
163
+ <p><a class="source-toggle" href="#"
164
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000001-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 397</span>
168
+ 397: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">doc_num</span>()
169
+ 398: <span class="ruby-ivar">@docs</span>.<span class="ruby-identifier">length</span>
170
+ 399: <span class="ruby-keyword kw">end</span>
171
+ </pre>
172
+ </div>
173
+ </div>
174
+ </div>
175
+
176
+ <div id="method-M000002" class="method-detail">
177
+ <a name="M000002"></a>
178
+
179
+ <div class="method-heading">
180
+ <a href="#M000002" class="method-signature">
181
+ <span class="method-name">get_doc</span><span class="method-args">(index)</span>
182
+ </a>
183
+ </div>
184
+
185
+ <div class="method-description">
186
+ <p>
187
+ Get the value of hint information. The return value is a result document
188
+ object or `nil&#8217; if the index is out of bounds.
189
+ </p>
190
+ <p><a class="source-toggle" href="#"
191
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
192
+ <div class="method-source-code" id="M000002-source">
193
+ <pre>
194
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 402</span>
195
+ 402: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_doc</span>(<span class="ruby-identifier">index</span>)
196
+ 403: <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">index</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">Integer</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
197
+ 404: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-ivar">@docs</span>.<span class="ruby-identifier">length</span>
198
+ 405: <span class="ruby-ivar">@docs</span>[<span class="ruby-identifier">index</span>]
199
+ 406: <span class="ruby-keyword kw">end</span>
200
+ </pre>
201
+ </div>
202
+ </div>
203
+ </div>
204
+
205
+ <div id="method-M000003" class="method-detail">
206
+ <a name="M000003"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="#M000003" class="method-signature">
210
+ <span class="method-name">hint</span><span class="method-args">(key)</span>
211
+ </a>
212
+ </div>
213
+
214
+ <div class="method-description">
215
+ <p>
216
+ Get the value of hint information. `key&#8217; specifies the key of a hint.
217
+ &quot;VERSION&quot;, &quot;NODE&quot;, &quot;HIT&quot;, &quot;HINT#n&quot;,
218
+ &quot;DOCNUM&quot;, &quot;WORDNUM&quot;, &quot;TIME&quot;,
219
+ &quot;LINK#n&quot;, and &quot;VIEW&quot; are provided for keys. The return
220
+ value is the hint or `nil&#8217; if the key does not exist.
221
+ </p>
222
+ <p><a class="source-toggle" href="#"
223
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
224
+ <div class="method-source-code" id="M000003-source">
225
+ <pre>
226
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 411</span>
227
+ 411: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hint</span>(<span class="ruby-identifier">key</span>)
228
+ 412: <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">key</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
229
+ 413: <span class="ruby-ivar">@hints</span>[<span class="ruby-identifier">key</span>]
230
+ 414: <span class="ruby-keyword kw">end</span>
231
+ </pre>
232
+ </div>
233
+ </div>
234
+ </div>
235
+
236
+
237
+ </div>
238
+
239
+
240
+ </div>
241
+
242
+
243
+ <div id="validator-badges">
244
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
245
+ </div>
246
+
247
+ </body>
248
+ </html>
@@ -0,0 +1,307 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: EstraierPure::ResultDocument</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">EstraierPure::ResultDocument</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/vendor/estraierpure_rb.html">
59
+ lib/vendor/estraierpure.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Abstraction of document in result set.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000007">attr</a>&nbsp;&nbsp;
96
+ <a href="#M000006">attr_names</a>&nbsp;&nbsp;
97
+ <a href="#M000009">keywords</a>&nbsp;&nbsp;
98
+ <a href="#M000010">new</a>&nbsp;&nbsp;
99
+ <a href="#M000008">snippet</a>&nbsp;&nbsp;
100
+ <a href="#M000005">uri</a>&nbsp;&nbsp;
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <!-- if method_list -->
119
+ <div id="methods">
120
+ <h3 class="section-bar">Public Class methods</h3>
121
+
122
+ <div id="method-M000010" class="method-detail">
123
+ <a name="M000010"></a>
124
+
125
+ <div class="method-heading">
126
+ <a href="#M000010" class="method-signature">
127
+ <span class="method-name">new</span><span class="method-args">(uri, attrs, snippet, keywords)</span>
128
+ </a>
129
+ </div>
130
+
131
+ <div class="method-description">
132
+ <p>
133
+ Create a result document object.
134
+ </p>
135
+ <p><a class="source-toggle" href="#"
136
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
137
+ <div class="method-source-code" id="M000010-source">
138
+ <pre>
139
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 378</span>
140
+ 378: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">attrs</span>, <span class="ruby-identifier">snippet</span>, <span class="ruby-identifier">keywords</span>)
141
+ 379: <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">uri</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span>, <span class="ruby-identifier">attrs</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">Hash</span>,
142
+ 380: <span class="ruby-identifier">snippet</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span>, <span class="ruby-identifier">keywords</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
143
+ 381: <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
144
+ 382: <span class="ruby-ivar">@attrs</span> = <span class="ruby-identifier">attrs</span>
145
+ 383: <span class="ruby-ivar">@snippet</span> = <span class="ruby-identifier">snippet</span>
146
+ 384: <span class="ruby-ivar">@keywords</span> = <span class="ruby-identifier">keywords</span>
147
+ 385: <span class="ruby-keyword kw">end</span>
148
+ </pre>
149
+ </div>
150
+ </div>
151
+ </div>
152
+
153
+ <h3 class="section-bar">Public Instance methods</h3>
154
+
155
+ <div id="method-M000007" class="method-detail">
156
+ <a name="M000007"></a>
157
+
158
+ <div class="method-heading">
159
+ <a href="#M000007" class="method-signature">
160
+ <span class="method-name">attr</span><span class="method-args">(name)</span>
161
+ </a>
162
+ </div>
163
+
164
+ <div class="method-description">
165
+ <p>
166
+ Get the value of an attribute. The return value is the value of the
167
+ attribute or `nil&#8217; if it does not exist.
168
+ </p>
169
+ <p><a class="source-toggle" href="#"
170
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
171
+ <div class="method-source-code" id="M000007-source">
172
+ <pre>
173
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 355</span>
174
+ 355: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr</span>(<span class="ruby-identifier">name</span>)
175
+ 356: <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">name</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
176
+ 357: <span class="ruby-ivar">@attrs</span>[<span class="ruby-identifier">name</span>]
177
+ 358: <span class="ruby-keyword kw">end</span>
178
+ </pre>
179
+ </div>
180
+ </div>
181
+ </div>
182
+
183
+ <div id="method-M000006" class="method-detail">
184
+ <a name="M000006"></a>
185
+
186
+ <div class="method-heading">
187
+ <a href="#M000006" class="method-signature">
188
+ <span class="method-name">attr_names</span><span class="method-args">()</span>
189
+ </a>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+ <p>
194
+ Get a list of attribute names. The return value is a list object of
195
+ attribute names.
196
+ </p>
197
+ <p><a class="source-toggle" href="#"
198
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
199
+ <div class="method-source-code" id="M000006-source">
200
+ <pre>
201
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 350</span>
202
+ 350: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_names</span>()
203
+ 351: <span class="ruby-ivar">@attrs</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>
204
+ 352: <span class="ruby-keyword kw">end</span>
205
+ </pre>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <div id="method-M000009" class="method-detail">
211
+ <a name="M000009"></a>
212
+
213
+ <div class="method-heading">
214
+ <a href="#M000009" class="method-signature">
215
+ <span class="method-name">keywords</span><span class="method-args">()</span>
216
+ </a>
217
+ </div>
218
+
219
+ <div class="method-description">
220
+ <p>
221
+ Get keywords. The return value is a string of serialized keywords of the
222
+ result document object. There are tab separated values. Keywords and their
223
+ scores come alternately.
224
+ </p>
225
+ <p><a class="source-toggle" href="#"
226
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
227
+ <div class="method-source-code" id="M000009-source">
228
+ <pre>
229
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 370</span>
230
+ 370: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keywords</span>()
231
+ 371: <span class="ruby-ivar">@keywords</span>
232
+ 372: <span class="ruby-keyword kw">end</span>
233
+ </pre>
234
+ </div>
235
+ </div>
236
+ </div>
237
+
238
+ <div id="method-M000008" class="method-detail">
239
+ <a name="M000008"></a>
240
+
241
+ <div class="method-heading">
242
+ <a href="#M000008" class="method-signature">
243
+ <span class="method-name">snippet</span><span class="method-args">()</span>
244
+ </a>
245
+ </div>
246
+
247
+ <div class="method-description">
248
+ <p>
249
+ Get the snippet of a result document object. The return value is a string
250
+ of the snippet of the result document object. There are tab separated
251
+ values. Each line is a string to be shown. Though most lines have only one
252
+ field, some lines have two fields. If the second field exists, the first
253
+ field is to be shown with highlighted, and the second field means its
254
+ normalized form.
255
+ </p>
256
+ <p><a class="source-toggle" href="#"
257
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
258
+ <div class="method-source-code" id="M000008-source">
259
+ <pre>
260
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 364</span>
261
+ 364: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snippet</span>()
262
+ 365: <span class="ruby-ivar">@snippet</span>
263
+ 366: <span class="ruby-keyword kw">end</span>
264
+ </pre>
265
+ </div>
266
+ </div>
267
+ </div>
268
+
269
+ <div id="method-M000005" class="method-detail">
270
+ <a name="M000005"></a>
271
+
272
+ <div class="method-heading">
273
+ <a href="#M000005" class="method-signature">
274
+ <span class="method-name">uri</span><span class="method-args">()</span>
275
+ </a>
276
+ </div>
277
+
278
+ <div class="method-description">
279
+ <p>
280
+ Get the URI. The return value is the URI of the result document object.
281
+ </p>
282
+ <p><a class="source-toggle" href="#"
283
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
284
+ <div class="method-source-code" id="M000005-source">
285
+ <pre>
286
+ <span class="ruby-comment cmt"># File lib/vendor/estraierpure.rb, line 345</span>
287
+ 345: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>()
288
+ 346: <span class="ruby-ivar">@uri</span>
289
+ 347: <span class="ruby-keyword kw">end</span>
290
+ </pre>
291
+ </div>
292
+ </div>
293
+ </div>
294
+
295
+
296
+ </div>
297
+
298
+
299
+ </div>
300
+
301
+
302
+ <div id="validator-badges">
303
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
304
+ </div>
305
+
306
+ </body>
307
+ </html>