Sha256: 6831506b6d30e5685d47ac69904ca0acc139a6f5f1376aef1432511bd998ac1b
Contents?: true
Size: 531 Bytes
Versions: 26
Compression:
Stored size: 531 Bytes
Contents
#!/usr/bin/env ruby lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "inquisitio" # Perform a search against AWS CloudSearch # # example usage: # # ruby ./bin/search <enddpoint> "Star Wars" "title" endpoint = ARGV[0] query = ARGV[1] return_fields = [ ARGV[2] ] Inquisitio.config do |config| config.search_endpoint = endpoint end if return_fields.nil? puts Inquisitio.search(query) else puts Inquisitio.search(query, { "return_fields" => return_fields} ) end
Version data entries
26 entries across 26 versions & 1 rubygems