Sha256: 1867ae7bb47bcdc7b2e4b415cae2be75ebe481cab1408afba6f574ce75bb0d29

Contents?: true

Size: 601 Bytes

Versions: 26

Compression:

Stored size: 601 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, :return_fields => return_fields} )

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
inquisitio-0.1.2 bin/boolean_query
inquisitio-0.1.1 bin/boolean_query
inquisitio-0.1.0 bin/boolean_query
inquisitio-0.0.13 bin/boolean_query
inquisitio-0.0.12 bin/boolean_query
inquisitio-0.0.11 bin/boolean_query