Sha256: dffb80a70671493568c0a16809933f6af575cc5fcdfad29644c6349cb6866408
Contents?: true
Size: 899 Bytes
Versions: 12
Compression:
Stored size: 899 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 containing a boolean query against AWS CloudSearch # # example usage: # # ruby ./bin/search <enddpoint> "Star Wars" "genre" "Animation" "title" endpoint = ARGV[0] query = ARGV[1] filter_name = ARGV[2] filter_value = ARGV[3] return_fields = [ARGV[4]] Inquisitio.config do |config| config.search_endpoint = endpoint end puts Inquisitio.search(query, {filter_name.to_sym => filter_value.to_sym, :arguments => {:facet => 'genre', 'facet-genre-constraints' => 'Animation', 'facet-genre-top-n' => '5' }, :return_fields => return_fields })
Version data entries
12 entries across 12 versions & 1 rubygems