-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
29 lines (21 loc) · 1.06 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Omnifind
========
A wrapper for making requests to an Omnifind server and parsing the response
Example
=======
# The new method accepts a hash, and the hash must contain enough information to build a query. The host
# must be present, and either a full path or a collection and a term.
@results = Omnifind.new(:query => 'test', :index => 'intranet_collection', :host => 'search.example.org')
@results.estimated_results # => 143
@results.start_index # => 1
@results.items_per_page # => 10
@results.paginate # => a new WillPaginate::Collection
@results.entries.first =>
# {:summary=>
# "<SPAN class=\"ellipsis\">... </SPAN> <SPAN class=\"highlight\"><SPAN class=\"hlTerm0\">TEST</SPAN></SPAN> DATA for the purposes of illustration <SPAN class=\"ellipsis\">... </SPAN>",
# :title=>"Test document",
# :url=>"http://intranet.your.org/2004/april/813.pdf",
# :fields=>{"author"=>"Mr. Bacom"},
# :relevance=>"0.21"}
The options may also include :page and :items_per_page parameter.
Copyright (c) 2011 ASEE, released under the MIT license