Skip to content
/ omnifind Public

A ruby client for fetching and parsing results from the Yahoo/IBM Omnifind library

License

Notifications You must be signed in to change notification settings

asee/omnifind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A ruby client for fetching and parsing results from the Yahoo/IBM Omnifind library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages